问题原文
原帖链接 · Stephen · CC BY-SA 3.0
I have been told by an SEO company to redirect the site IP to the domain using a 301 redirect. This will apparently improve the SEO ranking of the site. The site has a dedicated IP address.
Is this worth doing and should it be done ?
已采纳解答
原帖链接 · Simon Hayter · CC BY-SA 3.0
While its not bad advice from the SEO company I do feel its a little incomplete, there's a tag that you can use on your pages to avoid duplicates finding their way into the index of search engines such as Google.
Better Advice
The better advice from the SEO company would be to ensure that your using Rel Canonical on your pages so no pages ever end up in the index of search engines such as Google as duplicate, the redirecting from IP > Domain should be seen as a user experience attribute rather than a SEO stand point in this day and age since correct usage of Canonical pages its impossible to have duplicates in any indexes.
There's no harm in 'NOT' redirecting IP to Domain (Assuming HTTP_HOST is not Set)
Personally I don't bother and actually find it a plus 'NOT' to redirect IP to Domain since if a DNS server is down on a END user (Not your DNS, Their ISP) then they can still access your site using IP (Yes this is a small percentage and those with IT minds will be a small amount but if theirs no harm having your site access via IP whats the HARM? none...)
rel="canonical" helps more ways than one
Also the benefits of using Canonical extend further than just the IP issue it prevents duplicates in far many ways, it prevents non-www duplicates, non-sef urls, short urls, and many more.
Using the tag is very straight forward you tell Google and other search engines the master page of your site... So lets say you have a page that is accessible by these 8 ways:
http://yourdomain.com/
http://yourdomain.com/index.php
http://www.yourdomain.com/
http://www.yourdomain.com/index.php
http://54.1.1.163/
http://54.1.1.163/index.php
http://another-domain-on-same-hosting-account/~2nd-domain-name/
http://another-domain-on-same-hosting-account/~2nd-domain-name/index.php
By using <link rel="canonical" href="http://www.yourdomain.com" /> within the <head> </head> section of your pages www.yourdomain.com will always be treated as the master in the eyes of the search engines meaning all the over accessible URLs will never hurt your SEO as well as making it unlikely people will ever find those URLS since they won't be listed on any search engines. This also helps juice being leaked never mind the problem of duplicate content.
Canonical should be different on each page
Please note this META tag is not a global set and you need to set it up differently on each page so for example if you have root, plus page1 and page2 then it'll look like so:
- Root
<link rel="canonical" href="http://www.yourdomain.com/" /> - Page1
<link rel="canonical" href="http://www.yourdomain.com/page1/" /> - Page2
<link rel="canonical" href="http://www.yourdomain.com/page2/" />
Canonical plugins for various CMS engines
If your using a Content Management System then this process is made easy since there will be more likely that someone has created a plugin/extension that will do the work for you (WordPress, Drupal and Joomla have many for eg.).
Read more about Canonical
I recommend you read more about rel="canonical":
- Canonical URL Tag - The Most Important Advancement in SEO Practices Since Sitemaps
- Matt Cutts SEO Advice URL Canonicalization
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
