Question on URLs and google

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
AdamZ
Regular
Posts: 7
Joined: Fri Jul 08, 2011 3:40 pm

Question on URLs and google

Post by AdamZ » Thu Jul 14, 2011 4:21 pm

So, somehow it came to pass that about half my urls were like www.example.com/index.php?/archive/entry-name.html and the other (older) half were like www.example.com/archive/entry-name.html

URL rewriting was disabled, so i enabled it again and now all entries are like www.example.com/archive/entry-name.html without the index.php?

So far so good. But here is my question. Within my entries, I have linked to some pages using index.php? and some without it. Also, the google sitemap plugin creates my sitemap using index.php? within the URL.

From a usability perspective, it doesn't matter. However, I am wondering if google will be unhappy having multiple calls to the same website. And secondly, could I just make an .htaccess rule that strips the index.php? from the URLs that use it? What might that look like?

User avatar
onli
Regular
Posts: 2397
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Question on URLs and google

Post by onli » Thu Jul 14, 2011 5:50 pm

What would a .htaccess rule help? You still would have the different links pointing to your blog.

I personally don't think it should matter that much, as the old links still work and two aren't many variants. If you are worried, you could try to use the canoncial-tag explained in http://googlewebmastercentral.blogspot. ... nical.html. Looks like it should fit.

AdamZ
Regular
Posts: 7
Joined: Fri Jul 08, 2011 3:40 pm

Re: Question on URLs and google

Post by AdamZ » Thu Jul 14, 2011 8:59 pm

thanks for the reply.

okay this is interesting. i used the HTML Link Metatags plugin to give canonical link reference. However, word is that sitemap should directly reference the canonical links.

So the sitemap plugin i don't think can do this. I guess I should get to work :)

AdamZ
Regular
Posts: 7
Joined: Fri Jul 08, 2011 3:40 pm

Re: Question on URLs and google

Post by AdamZ » Thu Jul 14, 2011 9:27 pm

i uploaded to the new version of sitemap and chose to only include permalinks and feeds. because i have permalinks to categories, archives, etc - these sections are all included as well. works great!

mdnava
Regular
Posts: 57
Joined: Wed Dec 15, 2004 10:17 pm

Re: It does matter

Post by mdnava » Sat Jul 16, 2011 12:31 pm

Yes it does matter, search engines will see both URLs as different pages with the same duplicated content. This shouldn't be a problem if there are a only few pages but it might be an issue in the future as your site grows.

My advice is, if there are a few pages (like 20 or so) linking to the "index.php?" fix it by editing each post. It should't take more than a few minutes. On the other hand, if you have a lot of this posts, the editing part is still recommended but a permanent redirection in .htaccess might be a good idea to avoid being penalized in the future because of duplicated content.

An example .htaccess rule you could try:
# RewriteRule ^index.php?/(.*)$ http: //www. domain. com/$1 [R=301,L,QSA]

Please note that Google Sitemaps likes to have the real URL to the real content. Some redirections are okay, but if many URLs in the sitemap redirect to another URL it will have issues, so the sitemap URLs should also be fixed.
Melvin D. Nava
Venelogía

Post Reply