Welcome to WebmasterWorld Guest from 54.198.118.102

Forum Moderators: Robert Charlton & andy langton & goodroi

internal #link question

     
6:45 am on May 18, 2017 (gmt 0)

Preferred Member

10+ Year Member

joined:July 9, 2003
posts:407
votes: 0


Hello WebmasterWorld, I'm a long time member that's been away from web dev for some time but getting back into it all.

I have a quick question about some content I'm creating, regarding internal page anchors.

Its a wordpress site that's configured to write the URLs as www.domain.com/article-title/ (notice the last "/" )

So when I create internal page anchors (if that's even the right term!) I end up with a URL that looks like: www.domain.com/article-title/#section

I think the URL should ideally be: www.domain.com/article-title#section (no "/" before the "#section") - but to do so will mean messing around with my settings for the rest of the site....which I'd prefer to avoid.

If I leave it, will that last "/" cause me a problem with Google thinking it's another page...and then run into duplicate content issues

....or does google just ignore the "#section" part of the URL anyway and index www.domain.com/article-title/

Hope that makes sense!
10:09 am on May 18, 2017 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10847
votes: 61


internal page anchors (if that's even the right term!)

the proper technical term is now "document fragment identifier"

If I leave it, will that last "/" cause me a problem with Google thinking it's another page...and then run into duplicate content issues

....or does google just ignore the "#section" part of the URL anyway and index www.domain.com/article-title/

google will only index the document url, ignoring everything after hash mark.

the www.example.com/article-title/ url would appear to a user agent as a path to a directory and would expect a directory listing or more likely the default directory index document for that directory. (e.g. index.html/php/etc would be served internally)
since this is a WP site, the directory path request is being internally rewritten to the wordpress script, typically /index.php
1:06 pm on May 18, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator goodroi is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 21, 2004
posts:3237
votes: 195


I refer to them as internal page anchors but I'm not proper :) Either way is going to be fine with Google because IMHO it is not a big deal. You can debate the fine details of this but there are bigger issues to worry about. You really need to focus on your page speed and mobile delivery. Those are much more important.
1:18 pm on May 18, 2017 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10847
votes: 61


will that last "/" cause me a problem with Google thinking it's another page.

i forgot to answer this specific question.
Either way is going to be fine with Google because IMHO it is not a big deal.

i agree - the trailing slash or not doesn't really matter but the fact changing most of the urls (to a non-slash in this case) could have some detrimental effects.
i wouldn't change it unless you had a good reason.
1:47 pm on May 18, 2017 (gmt 0)

Preferred Member

10+ Year Member

joined:July 9, 2003
posts:407
votes: 0


perfect - thanks very much both of you.

I moved hosts a few months ago and did some optimisation for page speed, and it's a responsive theme that works fine on mobile so fingers crossed all those items are reasonably good....there's more I could do for page speed though, so probably need to spend some time focused on that.

I'll leave my permalink structure as is. I didn't want to mess around with that given that google has indexed most of the site already, but also didn't want the "document fragment identifiers" ;) causing me any duplicate content challenges - thanks for your responses.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members