homepage Welcome to WebmasterWorld Guest from 54.167.144.4
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

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

    
Will Using Anchor Links With The Full URL Cause Problems For googlebot
Planet13




msg:4408613
 5:15 pm on Jan 19, 2012 (gmt 0)

Hi there, Everyone:

I have a long page that I would like to use anchor links on so that people can navigate to specific sections of the page quickly.

However, my shopping cart requires that I use the full URL path in the anchor (along with a little javascript. Will that trip up googlebot or hurt my rankings?

Instead of using an anchor tag such as:

<a href="#more_details">

I have to use:

<a href="http://www.mydomain.com/page1.html#more_details" onclick="javascript:window.location.hash='more_details'; return false;">

Is that going to be a problem?

Thanks in advance.

[edited by: tedster at 5:35 pm (utc) on Jan 19, 2012]
[edit reason] turn off automatic linking [/edit]

 

enigma1




msg:4408648
 6:35 pm on Jan 19, 2012 (gmt 0)

No it's not a problem. But you don't need the js for this, you could setup the local anchors with the name property so users can navigate into the different page sections.

The reason the <a href="#more_details"> doesn't work as you expect is likely because you set the base tag in the document. So the href="#more_details" will point to index.html#more_details and not to the page you're at.

seoskunk




msg:4408674
 7:52 pm on Jan 19, 2012 (gmt 0)

You are overiding the click with javascript so can work like this

<a href="#more_details" onclick="javascript:window.location.hash='more_details'; return false;">

Planet13




msg:4408690
 8:34 pm on Jan 19, 2012 (gmt 0)

@ enigma1

The reason the <a href="#more_details"> doesn't work as you expect is likely because you set the base tag in the document.


Yes, you are correct. Unfortunately, since this is an ecommerce platform, I can't change the base href tag without causing a lot of collateral damage.

You are overiding the click with javascript so can work like this

<a href="#more_details" onclick="javascript:window.location.hash='more_details'; return false;">


Yes, I am overriding the link for visitors who have javascript turned on.

But for visitors who have javascript turned off, I can't simply use <a href="#more_details"> because it will take the visitor to the home page (instead of the named anchor part of the same page).

So for visitors with javascript turned OFF, I need the full URL to the named anchor.

but just to double check with everyone, having that "self referencing" link with the full URL shouldn't affect my rankings / crawlability, right?

tedster




msg:4408700
 8:42 pm on Jan 19, 2012 (gmt 0)

I don't see how it would cause any crawling problems. "Self referencing" links are still pretty common on the web (mostly because of clumsy CMSs I think), and I haven't seen evidence of any issues.

Planet13




msg:4408711
 9:00 pm on Jan 19, 2012 (gmt 0)

Thank you, tedster!

Having the anchor text links will DEFINITELY help visitors to the page.

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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved