Forum Moderators: Robert Charlton & goodroi
www.domainname.com//pagename.html
Well, now, that's odd, I thought. So I followed the link, and found a whole version of my site available by using the double-slash, because I've used relative URLs instead of absolute URLs in my internal links, that is, my internal links look like:
href="pagename.html"
rather than
href="http://www.domainname.com/pagename.html"
I always figured so many sites use relative URLs, G must be able to deal with it, but I guess not. I'll be using absolute URLs from now on, believe me!
So now my question is, after fixing it, what should I do to get the double-slash version of my site out of the supplemental index?
Now I'm slowly going through all my pages and giving each page its own meta-description. A slow and tedious process that I wished I'd done as I created each page. But it's already showing its worth - when I do a site:www.example.com search, the pages that appear before the "If you like, you can repeat the search with the omitted results included." message are those that I've edited. Those are growing in number every few days and I suspect that those pages are pulling the site up by its bootstraps.
Another problem that I had was in my 301 redirect code that did a non-www to www version. There had been errors in the code and I'll be forever grateful to JD Morgan for helping me straighten that out in another WW forum.
I'm curious, when you say you fixed it, do you mean you simply changed all your links to absolute URLs, or did you do a 301 redirect from the double-slash pages to the non-double-slash version?
Neither to fix the double slash problem. The site is database driven and has a "configuration" file. The problem was inside that file where the root URL was defined mistakenly as "www.example.com/" and removing the "/" from that solved the problem that I had.
It seems very odd to me that Google doesn't deal with this automatically. Lots of websites use relative URLs and I bet few webmasters even know about the www vs. non-www redirect, let alone this. If you do what Google wants you to do, which is pretend they don't exist, you might have most of your site supplemental and never even know about it.
I bet I have one typo somewhere that leads into the double-slash version of the site, and once in G just spiders it as if it were a whole different set of pages. Wild.