PDA

View Full Version : Learned a valuable lesson with relative URLs



mobilebadboy
03-22-2010, 05:47 AM
I've got a large shopping section on one of my sites and all (or most all) of the URLs are set up in the ../../ fashion. I did this so I could duplicate sections while only having to dynamically change anchor text -- everything is setup up the same otherwise.

I just redeveloped and redeployed this section last night and started glancing at the bot stats, and boy did I see this URL setup was a mistake, at least with Google. I'm seeing a ton of entry page tracking that looks like:

http://domain.com/shopping/blah/blah/http://domain.com/shopping/

Which of course results in 404s.

So after the weeks of work and finally getting excited about putting the new section up, I've realized I should have been watching my stats more closely along time ago. Would have just saved me an extra 2 hours of "quick" work to convert everything to absolute URLs.

A bit late for old areas, but new areas of the section will hopefully get crawled properly.

:sick:

Chris
03-22-2010, 10:04 AM
Yup, I always recommend absolute ones, just one last chance for an error.

Mr. Pink
03-22-2010, 07:48 PM
But why was there an error? Were your relative paths set up incorrectly, or were they set up correctly and still crawled incorrectly?

mobilebadboy
03-23-2010, 09:38 PM
Every other search engine has crawled them correctly so I can't imagine that they were setup incorrectly. I had no directory names or anything included, just ../ and ../../ and ../../../ and so on. Google was hitting the right urls, just appending the "home" url to the end of them for whatever reason. Not every link, but a good many of them.

A little more looking has seen G do this on other areas of the same site, as well as other sites, that have all absolute urls. That one has me totally confused.

Mr. Pink
03-23-2010, 10:28 PM
A little more looking has seen G do this on... other sites, that have all absolute urls. That one has me totally confused.

So, maybe that means that the fact that you had relative URLs ../../ had absolutely nothing to do with the Google crawl errors.

Maybe Google simply appends the "home" URL to every site it crawls, just to check if the site happens to have a "home" URL.

bermuda
04-05-2010, 08:34 AM
Well, such minor things might sometimes remain unnoticed and as you have mentioned could cause a lot of page drops when Google begins crawling the websites sections. Checking the pages URLs before uploading them is always a necessity, especially while working on very large sites with hundreds of pages.