Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Legitimate use of duplicate URL?

Using anchor to specific point on a page

         

AndyA

1:17 pm on Nov 17, 2006 (gmt 0)

10+ Year Member



It's early and I haven't had my normal amount of coffee yet, but I believe I have a legitimate use of a duplicate URL. Let's say you have an index page in a folder on your site. The URL is example.com/foldera/ and there is an index page located in that folder. So, the proper way to link to that page would be as above, example.com/foldera/ .

That particular page has information on red widgets, blue widgets, green widgets, yellow widgets, etc. If you want to take a visitor to the specific point on that page that talks about yellow widgets, you can use an anchor to do it (A name="yellow"). But to get them there from another page on your site, you would have to link to it like this: example.com/foldera/index.shtml#yellow would you not?

I don't see any other way to do this, so that page would have two different URLs pointing to it, and both perfectly legitimate and proper. So how does Google deal with this? Is an exception made for anchors within a page, or do they still penalize your site for some reason?

Is there another way to link in this manner that I'm not aware of?

jonrichd

7:58 pm on Nov 17, 2006 (gmt 0)

10+ Year Member



Based on a quick test I just ran, you could do it either way:

example.com/foldera/index.shtml#yellow will work, as will

example.com/foldera/#yellow.

So, while there are two ways to link to the URL, it seems like you should pick one, and stick with it - there isn't any reason to use both.

theBear

8:07 pm on Nov 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From what I see (we have several of these on a number of pages) Google strips off the internal page anchor.

Which in the case you are describing would result in a duplicate content issue since / and /index.shtml are two different names for what you consider to be the same thing.

appi2

8:16 pm on Nov 17, 2006 (gmt 0)

10+ Year Member



Think about it, its better to go for
example.com/foldera/#yellow.

Just incase you ever change .php .html .asp etc

AndyA

8:33 pm on Nov 17, 2006 (gmt 0)

10+ Year Member



I didn't know that would work. I'll make the change and see if it helps any. It sure would be nice to be able to spend some time working on my site for my visitors instead of trying to appease Google...

Edit to add: Thanks to everyone for the advice, I appreciate it.

[edited by: AndyA at 8:45 pm (utc) on Nov. 17, 2006]

g1smd

2:18 pm on Nov 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Everything after the # is simply ignored.

Check your log files. Do bots even request the # part?

I suspect not.

.

I believe that it is only the browser that makes use of the named anchor in knowing where to "jump to" within the page.

The # part has no bearing on how the page is served.

Does a browser even send the # part of the URL to the server?

pageoneresults

2:49 pm on Nov 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't see any other way to do this, so that page would have two different URLs pointing to it, and both perfectly legitimate and proper. So how does Google deal with this? Is an exception made for anchors within a page, or do they still penalize your site for some reason?

Google doesn't see the fragment identifier or named anchor. It is a client-side function performed at the browser and not the server.

I don't think you have anything to worry about in this instance. Google is not going to see duplicates. Google will see the primary URI and not the fragment identifier.

What you do need to be concerned with is using /index.html as opposed to /. Google will see those as two different locations (in the beginning). The one with the most links win. It is best practice to not use /index.html when formatting URIs. When it comes to root level pages (e.g. index.html), you should trim back to the trailing forward slash.

www.example.com/index.html#fragment
www.example.com/#fragment

Use the second example above to keep things short, sweet and at the same time, don't expose the underlying technology of the site (e.g. html, asp, php, jsp, etc.).