开发者

Canonical URLs and Google

As far as Google and canonical URLs go - is there any开发者_Go百科 advantage to adding a 301 redirect from:

http://www.mydomain.com/index.php

to

http://www.mydomain.com/


No the default page to open when no page name is specified is either "index.html" or "index.php", with the priority given to the latter by default. So there will not be any advantage as such & moreover, it's not needed.

For any other page (except the Home page or the "index" named pages), if you specify the Redirect Header 301, then you are notifying Google & other search engines to store the target URL as the active & the latest one (not the first one), in their database. It's like setting a permalink in the databases of the search engines with your latest active URLs.

There will be one big advantage, however. When you are specifying "http://www.mydomain.com/index.php", you are notifying search engines to load the "index.php" page only all the times. However, if you just specify "http://www.mydomain.com/" to the search engines, then it's upto the (mydomain.com) server's interpretation (after understanding that server's HTAccess rules & other Redirection rules, if any) to show the user the correct file - it may be "index.php" (first priority), or "index.html", or "index.htm" - although that correct file may or may not be present in that server's hosting space.
If the correct file is not present, then a 404 Not Found page is shown. And it's the responsibility of the owner of that server to have the correct file in his server's root folder, so that never a 404 Not Found page is shown to any user.

So I will say that it's a big advantage mentioning "http://www.mydomain.com/" instead of "http://www.mydomain.com/index.php".

Hope it helps.


I don't think there's any advantage of using a redirect..for one thing, it will add loading time to your page, and Google also ranks pages according to speed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜