homepage Welcome to WebmasterWorld Guest from 50.17.162.174
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Double forward slash - a canonical concern?
1script




msg:4598496
 6:34 pm on Aug 1, 2013 (gmt 0)

I'm trying to fix an issue where pages of my site open with either correct

www.example.com/example.htm

or incorrect double forward slash in the beginning of the file path:

www.example.com//example.htm

Oddly enough, the second form is how GA sends me to my own pages from its reports. I can't figure out if it's a GA issue or something's terribly wrong with how Googlebot browses my site.

Anyhow, the site has a rather complicated .htaccess file and I've yet to find a rule that would satisfy all the other existing rules but successfully removed that extra forward slash. While working on it, I got to wonder if that even matters. It looked to me that the way this always happens with GA reports, perhaps Google takes a relaxed view on that extra slash that does not change anything. Perhaps they even delete it themselves before indexing, I'm not sure.

Does anyone see an issue with leaving that extra forward slash untouched and letting pages open on both versions of URL?

 

JD_Toims




msg:4598500
 7:23 pm on Aug 1, 2013 (gmt 0)

Personally, I'd fix them. Even if they're not an issue right now with how Google handles your site and rankings who knows about tomorrow or other search engines?

It would suck to leave them the way they are and wake up one day to find they're causing a ranking issue and have traffic drop while your waiting for the fix to make it through the system.

* If you can't get the .htaccess working rel=canonical to the non-double slash location should cover it with the major SEs at least.

1script




msg:4598564
 11:04 pm on Aug 1, 2013 (gmt 0)

Thanks, JD. I already have rel=canonical on all content pages, so perhaps that's not such a big deal. I would still think it affects my crawling budget because bots need to read the same page twice, so I'm planning to get to the bottom of this eventually.

lucy24




msg:4598568
 11:10 pm on Aug 1, 2013 (gmt 0)

RewriteRule ^/+(.*) http://www.example.com/$1 [R=301,L]

:)

JD_Toims




msg:4598573
 11:15 pm on Aug 1, 2013 (gmt 0)

NP. One thing I thought of later is if your site is PHP driven it would be fairly easy to drop the redirect on the page(s) if one is requested with a // and totally bypass the .htaccess. (This is how I would do it if the .htaccess was giving me too much of a headache lol)

if(strpos($_SERVER['REQUEST_URI'],'//')!==FALSE) {
$redirect_to=str_replace('//','/',$_SERVER['REQUEST_URI']);
header('Location: http://www.example.com'.$redirect_to,TRUE,301);
}

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved