Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Is it Okey to do like the following for SEO purpose:home, or do I need to do it like this:home?
In each page of my website, do the links in navigation count as "internal links", why cannot I get the list of internal links in "Internal links" in Google Webmaster?
There is no difference between absolute and relative path as search engine crawler will treat both in same manner.
But; when any one copy your link provided as absolute path, they can easily get the whole link and can share exact URL on their website.
In short, you do not need to use absolute links to optimize for search engines. Search engine crawlers will be able to figure out the structure of your site. Using absolute paths is actually beneficial, because if you ever need or want to change your domains you will not have to hunt and peck over your entire site's codebase to resolve it.
Although it won't make a huge difference, if your're really worried about it you can use the canonical tag in your HTML head.
<html>
<head>
<title>This is my site</title>
<link rel="canonical" href="http://www.mydomain.org/mysite" />
</head>
<body>
</body>
</html>
Google Webmaster blog post about canonical link best practices
Wikipedia description of canonical link tag
There is no difference as far as SEO goes for using absolute vs. relative for internal linking. But if you are using absolute, you might see your own domain show up as a referrer in your analytics.
If you want to use relative paths, then use <base href=""> in your head ... see http://www.w3schools.com/tags/tag_base.asp
Here are some other related suggestions in regard to rel="canonical" SEO, and analytics:
1) Google, when indexing pages, ignores everything after the # in your URLs, so use # instead of ? ... Then, for your SEO purposes, Google will consider:
http://example.com/pagename.html
and
http://example.com/pagename.html#var1=FOO&var2=BAR to be the same page.
2) You can also set in the head of your pages:
<link rel="canonical" href="http://www.example.com/pagename.html" />
see: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
3) As far as reporting goes, in google analytics, they support use of # as query string delimiter, see: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiCampaignTracking#_gat.GA_Tracker_._setAllowAnchor
4) In your google analytics profile, you can also set it to exclude query string parameters. See: http://support.google.com/analytics/bin/answer.py?hl=en-GB&answer=1010249
I prefer method #1. All of my tracking URLs for campagins and all internal links and logic use # as the query string delimeter so I can maximize my link juice to the canonical domain (no www subdomain in my canonical) I set in .htaccess like this:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Here my suggestion would be to use either '/' or 'www.mysite.com' instead of appending index.php. Let everything resolve to your root domain.
If both root domain name & index.php exists, it might create duplicate content problem.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I am about to manually submit a website url to the google search console to be indexed. I will like to know if there will be a major difference between adding the www along with my url (http://www.example.com) as apposed to just submitting the domain name (http://example.com).
I have read the google guidelines and watched a few of their search-console videos but they didn't mention anything about the importance of the www.
Do i gain or loose anything from including or excluding the www from my URL when submitting it to the google search console for indexing?
Can anyone help me on this issue?
Your help is much appreciated.
Best Regards.
To your question. I personally think the only distinct difference I can think of is that a potential consumer that would visit your website will be more used to seeing www. instead of just purely http://domain.com
I would recommend you opt for http://www.domain.com, besides that there will not be any difference in SEO Value.
There is no difference in submitting www vs non-www version. The only thing you should be care about is that only one version is actual. You should choose the domain name for your website and put a 301 Moved Permanently redirect at other name.
It is very important to have only one copy of your content. Duplicated content is penalized by Google and if you have your website open at domain.com and www.domain.com then this instantly creates duplicated content of all pages of your website.
The second thing you should do before submitting your website is to create a sitemap. From my experience when a site has a sitemap google index it much faster.
You should also review all titles, meta descriptions and other SEO issues. I would recommend to check your whole website for SEO issues with some SEO crawler. Try screaming frog if you want to test from your local computer or use online service like https://seocharger.com to check online. You can even set up SEO monitoring there.
I have a ecommerce site with hundreds of products. I recently changed permalinks and their base. Using Wordpress and Woocommerce plugin, I removed /shop/%product-category% from the URL. However, my old URLs are still active. Check out the following example:
greenenvysupply.com/shop/accessories/gro1-1-3mp-usb-led-digital-microscope-10x-300x/
greenenvysupply.com/gro1-1-3mp-usb-led-digital-microscope-10x-300x/
The first URL is old. Why does it still work? Shouldn't I get a 404 page?
Here is code from page source related to the canonical:
href="https://www.greenenvysupply.com/shop/feed/" />
<link rel='canonical' href='https://www.greenenvysupply.com/gro1-1-3mp-usb-led-digital-microscope-10x-300x/' />
<meta name="description" content="The 1.3 Mega-Pixel USB LED Digital Microscope is great for identifying pests and diseases on your plants so you can accurately resolve the problem."/>
<link rel="canonical" href="https://www.greenenvysupply.com/gro1-1-3mp-usb-led-digital-microscope-10x-300x/" />
Because the old URL is still active and not redirecting, my entire website is being seen as having duplicate content. Google crawlers are not being redirected. Why is the URL with /shop/ in it still active even though I have changed the permalink? There has got to be an easy fix for this.
A canonical URL or other metadata in your response is not the same as a redirect. To accomplish a redirect, your server needs to return a 3xx status code (typically a 301 or 308 for a permanent move as you have here or a 302 or 307 for a temporary move) and return a "Location" header that indicates the URL to which to redirect. How exactly you make your server do this is dependent on the type of server or server framework that you happen to be using for your website.
How to accomplish a redirect is somewhat independent of your implicit SEO question about whether to prefer a redirect over a canonical URL, which I'm afraid I cannot answer. Regardless of the approach you use, though, you should be aware that search engines -- Google or otherwise -- may not reflect the changes from your website immediately, so don't panic if you don't see the desired search engine change you were looking for immediately following a change to your website.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
For many websites, the "www" part of the URL is optional, e.g. http://mysite.com and http://www.mysite.com are often aliases for the same page.
According to this page, there's an SEO benefit to redirecting all requests to http://mysite.com to http://www.mysite.com.
Is this really true? It seems to me that Google should be smart enough to check whether http://www.mysite.com and http://mysite.com are pointing to the same page, and only treat them as distinct pages if the content at each URL is different.
It seems to me that Google should be smart enough to check whether http://www.mysite.com and http://mysite.com are pointing to the same page.
They're not. That's why they offer the option to set your preferred domain in Google Webmaster Tools.
The preferred domain is the one that you would liked used to index your site's pages (sometimes this is referred to as the canonical domain). Links may point to your site using both the www and non-www versions of the URL (for instance, http://www.example.com and http://example.com). The preferred domain is the version that you want used for your site in the search results.
Once you tell us your preferred domain name, we use that information for all future crawls of your site and indexing refreshes. For instance, if you specify your preferred domain as http://www.example.com and we find a link to your site that is formatted as http://example.com, we follow that link as http://www.example.com instead. In addition, we'll take your preference into account when displaying the URLs. If you don't specify a preferred domain, we may treat the www and non-www versions of the domain as separate references to separate pages.
If it matters for search engine robots, it's because it matters for human beings.
URL canonicalization and redirection help SEO, yes, by concentrating otherwise diluted link juice.
Canonicalization matters for a variety of reasons -- mainly, because it organizes information, coherently associating diverse/disparate references to a single resource address.
For example, the following hypothetical URLs would likely all point to the same page (in this case, the home page of a site):
example.com
www.example.com
www.example.com/
www.example.com/index.html
www.example.com/index.html?var1=360
www.example.com/index.html?var1=46&var2=glenn
https://example.com
https://www.example.com
https://www.example.com/
https://www.example.com/index.html
https://www.example.com/index.html?var1=420
https://www.example.com/index.html?var1=46&var2=glenn
http://example.com
http://www.example.com
http://www.example.com/
http://www.example.com/index.html
http://www.example.com/index.html?var1=420
http://www.example.com/index.html?var1=46&var2=glenn
Which among the above is the best URL to serve as the canonical ultimate destination?
There is a correct answer (imho), but it's not listed above: https://example.com/
Why?
Trailing Slash: dramatically improves page load time.
HTTPS: it's more secure than HTTP:
Non-www Root: I'm in the non-www camp because I prefer fewer characters in URLs, but there are good reasons for the WWW as well including cookie-restriction and more DNS flexibility. Whether to go with www.example.com or just example.com (or even art.example.com) depends on your taste, preference, age, needs, plans, and goals.
Ok, i used the below to "seoize" my urls. It works great..the only problem is when i go to the old page it doesnt redirect to the new page.. so i have a feeling i will get two pages indexed in google... how can i just permenantly redirect the old pages eto new urls...
RewriteRule ^city/([^/]+)/([^/]+) /rate-page.php?state=$1&city=$2 [NC]
http: / / www.ratemycommunity.com/city/Kansas/Independence
and old page = http://www.ratemycommunity.com/rate-page.php?state=Kansas&city=Independence
The problem is that the ugly url must be visible, as you need them for the rewrite. Just don't make any links to the ugly urls.
If search engines already know about the ugly urls, you can add another query parameter, say show=yes.
In the rewrite rule, ensure that you have the last parameter show=yes. If not, redirect to the nice url, which in turn will rewrite to the ugly url with the last parameter. Then, never link externally to the ugly url with the show=yes parameter.
Example:
/rate-page.php?state=Somestate&city=Somecity&show=yes
Accessing this page will show the content, but you must not make that link visible from anywhere.
/city/Somestate/Somecity
should be rewritten to /rate-page.php?state=Somestate&city=Somecity&show=yes, and
/rate-page.php?state=Somestate&city=Somecity
should be redirected to /city/Somestate/Somecity
The best thing to do is use cannonicalization, a recently introduced page tagging concept that tells Google and other crawlers what you want to be the URL of record. Check out this documentation and video by Google SEO guru Matt Cutts.
In your case, it will look like this:
<link rel="canonical" href="http://www.ratemycommunity.com/city/Kansas/Independence"/>
Let's say I have a web site for hosting community generated content that targets a very specific set of users. Now, let's say in the interest of fostering a better community I have an off-topic area where community members can post or talk about anything they want, regardless of the site's main theme.
Now, I want most of the content to get indexed by Google. The notable exception is the off-topic content. Each thread has it's own page, but all the threads are listed in the same folder so I can't just exclude search engines from a folder somewhere. It has to be per-page. A traditional robots.txt file would get huge, so how else could I accomplish this?
This will work for all well-behaving search engines, just add it to the <head>:
<meta name="robots" content="noindex, nofollow" />
If using Apache I'd use mod-rewrite to alias robots.txt to a script that could dynamically generate the necessary content.
Edit: If using IIS you could use ISAPIrewrite to do the same.
You can implement it by substituting robots.txt with dynamic script generating the output.
With Apache You could make simple .htaccess rule to acheive that.
RewriteRule ^robots\.txt$ /robots.php [NC,L]
Simlarly to #James Marshall's suggestion - in ASP.NET you could use an HttpHandler to redirect calls to robots.txt to a script which generated the content.
Just for that thread , make sure your head contains a noindex meta tag. Thats one more way to tell search engines not to crawl your page other than blocking in robots.txt
Just keep in mind that a robots.txt disallow will NOT prevent Google from indexing pages that have links from external sites, all it does is prevent crawling internally. See http://www.webmasterworld.com/google/4490125.htm or http://www.stonetemple.com/articles/interview-matt-cutts.shtml.
You can disallow search engines to read or index your content by restricting robot meta tags. In this way, spider will consider your instructions and will index only such pages that you want.
block dynamic webpage by robots.txt use this code
User-agent: *
Disallow: /setnewsprefs?
Disallow: /index.html?
Disallow: /?
Allow: /?hl=
Disallow: /?hl=*&