: SEO: Make hashtag links look static So I have a website which displays all my content vertically. (like modern websites often do these days). Thus I can't create static links to each section.
So I have a website which displays all my content vertically. (like modern websites often do these days). Thus I can't create static links to each section. I'm currently handling the scrolling with javascript. My navigation looks like this.
<ul>
<li><a href="#services">Services</a></li>
<li><a href="#references">References</a></li>
<li><a href="#blog">Blog</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
I also created 301 redirect links with htaccess. E.g. /services which leads to /#services.
If I were to use them in my navigation, I'd have to trigger the scrolling with the onpopstate event. Thats not really a problem, but would searchengines accept that kind of setup ?
I also created a sitemap and submitted it to google, but the indexing is still pending.
More posts by @Karen161
1 Comments
Sorted by latest first Latest Oldest Best
You have 1 page. All the content is loaded as the page loads and all the content is visible. So, there is only 1 page and 1 canonical URL that identifies that page. (This is not an AJAX loaded page where sections are loaded later on request.)
Search engines (ie. Google) index pages, not parts of pages. So, I can't see as there is any benefit (from an SEO viewpoint) in attempting to identify these separate sections as different pages, when they are not. You could even end up with duplicate content issues!? IMO the sitemap (if indeed you supply one at all) should have just 1 page.
However, Google might actually handle this for you and offer the appropriate link to your sub section in the SERPs. I'm not sure how prevalent this is, but Google is able to index in-page links to some extent. For example:
Example#1 Search Google for: the document body site:www.w3.org
You will see that the very top result shows:
"Jump to The BODY element" is an in-page anchor half way down the page, which is simply linked to from the page contents at the top.
Example#2 Search Google for: google safe search
Part way down the SERPs (currently #3 ) you will see:
I would have hoped that Google would be able to identify both elements with an id="foo" and named anchors eg. <a name="foo"></a> as the target. But all the examples I've seen in the wild use named anchors in order to identify the target. And I've also only seen it applied to large/established sites?! (But that might be partly because many sites don't use named anchors these days?)
Here is some information from Google themselves (Sept 2009) on "Using named anchors to identify sections on your pages": googlewebmastercentral.blogspot.co.uk/2009/09/using-named-anchors-to-identify.html
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.