Hash URLs
-
Hi Mozzers,
Happy Friday! I have a client that has created some really nice pages from their old content and we want to redirect the old ones to the new pages. The way the web developers have built these new pages is to use hashbang url's for example www.website.co.uk/product#newpage
My question is can I redirect urls to these kind of pages? Would it be using the .htaccess file to do it?
Thanks in advance,
Karl
-
Just wanted to clear up a bit of confusion. There is a difference between what can be redirected and what will be indexed by search engines.
It is absolutely possible to redirect the old URL to the new one that includes the local anchor (hash). In this way, user experience is preserved as for example, the old "what is matcha" page can be redirected directly to the new "what is matcha" tab, landing the user exactly where they expect to be. This is done in .htaccess as normal, but don't forget to escape the # symbol in the URL when you write the redirect.
But as Schwaab says, Google will index all the tabs' content as if they were all one page. If you look at the page source for any of those the tabbed pages, you'll see it's actually one primary page that includes separate sections for each tab - you can use GWT's Fetch as Googlebot to confirm this. So getting the main URL indexed means all the tabs' content are indexed, just not under separate URLs.
Having separate pages each targeting different but related matcha-related keywords can be beneficial, but so can having a single, longer-content, authoritative page with many more incoming links (as would be the case if the old separate pages were redirected to one primary page, consolidating all their separate link authority). That becomes a judgment call and is where the "art of SEO" come into play
Hope that helps?
Paul
P.S. Little quirk of local anchor URLs. If you're adding parameters to them such as Google Analytics tracking for incoming links, you need to add the hash after the parameters, or the local anchor won't work. e.g. mysite.com#localanchor becomes mysite.com?utmsource=foo&utm_medium=foo&utm_campaign=bar#localanchor
-
Good luck!
-
I thought that'd be the case! trying to get the developers to create unique pages and try and keep a similar/same design, not sure if it'll be too difficult though. Thanks for the advice though, fingers crossed we'll find a solution.
-
I misunderstood you before, I thought you meant the old URLs had the anchors.
You are correct, technically the tabs are not unique pages. You would have to redirect each of the previous pages to http://www.teapigs.co.uk/tea/matcha_shop rather than to the anchored URL.
Having content under tabs may limit your ability to rank for a variety of keywords. For example, if previously there was a page ranking for "What is Matcha?", it may now be difficult to rank for this term because there is no longer a unique page dedicated to the topic. You lose the ability to have a unique URL, Title Tag, Meta Description, H1, and so on.
-
Hi Schwaab,
Thanks for the reply. Google hasn't cached the new pages.
For example, the old page is http://www.teapigs.co.uk/customer/pages/matcha/what-is-matcha and the new content sits on http://www.teapigs.co.uk/tea/matcha_shop with the different tabs. Are we going to have to make them actual pages with static URL's for them to be crawled and indexed? Got a feeling we will!
-
Is the content technically on one page (ww.website.co.uk/product) and just being displays based on the anchor in the URL?
Has Google indexed the anchored URLs? In my experience Google does not index anchored URLs.
I'd love to see an example to see how it is coded; however, if they are just anchored URLs displaying content that is all located on one page, the products page, then the products page would be the only page you can redirect. Technically, anchored URLs are not unique pages.
If the content is being generated with AJAX and your developers are using the hashbang method to serve a unique URL, I don't believe you would see the hash in the URL.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Index an URL without directly linking it?
Hi everyone, Here's a duplicate content challenge I'm facing: Let's assume that we sell brown, blue, white and black 'Nike Shoes model 2017'. Because of technical reasons, we really need four urls to properly show these variations on our website. We find substantial search volume on 'Nike Shoes model 2017', but none on any of the color variants. Would it be theoretically possible to show page A, B, C and D on the website and: Give each page a canonical to page X, which is the 'default' page that we want to rank in Google (a product page that has a color selector) but is not directly linked from the site Mention page X in the sitemap.xml. (And not A, B, C or D). So the 'clean' urls get indexed and the color variations do not? In other words: Is it possible to rank a page that is only discovered via sitemap and canonicals?
Intermediate & Advanced SEO | | Adriaan.Multiply0 -
Best way to structure urls wordpress and Yoast?
I am using Wordpress and Yoast. I have Parent pages and child pages. Yoast recommends you have the keyword in the url. For the parent page I have the city name in the url. Question is, should the child pages also have the city name in the url or would that be considered keyword stuffing? Here is the current structure. http://forestparkdental.info/st-louis-dental-services/restorative-dentistry/inlays-and-onlays So didn't know if should have the end of that url as /restorative-dentistry-st-louis /inlays-and-onlays-st louis since those are separate pages and Yoast and Moz plugin doesn't give you the Green light in in all areas unless you do it like this? Thanks Scott
Intermediate & Advanced SEO | | scott3150 -
Should I remove 404 urls in webmaster tools?
I've recently removed a lot of category pages so should I remove the urls in webmaster tools or let them drop out of the index naturally?
Intermediate & Advanced SEO | | SamCUK0 -
Is there any importance in including http:// in the url?
I have seen some sites that always redirect to https and some sites that always redirect to http://, but lately I have seen sites that force the url to just the site. As in [sitename].com, no www. no http://. Does this affect SEO in anyway? Is it good or bad for other things? I was surprised when I saw it and don't really know what effect it has.
Intermediate & Advanced SEO | | MarloSchneider0 -
How Long Before a URL is 'Too Long'
Hello Mozzers, Two of the sites I manage are currently in the process of merging into one site and as a result, many of the URLs are changing. Nevertheless (and I've shared this with my team), I was under the impression that after a certain point, Google starts to discount the validity of URLs that are too long. With that, if I were to have a URL that was structured as follows, would that be considered 'too long' if I'm trying to get the content indexed highly within Google? Here's an example: yourdomain.com/content/content-directory/article and in some cases, it can go as deep as: yourdomain.com/content/content-directory/organization/article. Albeit there is no current way for me to shorten these URLs is there anything I can do to make sure the content residing on a similar path is still eligible to rank highly on Google? How would I go about achieving this?
Intermediate & Advanced SEO | | NiallSmith0 -
What Should I Do With My URL Names?
I release property on my blog each week, and it has come to the point we will get property in the same area as we have had in the past. So, I name my URL /blah-blah-blah-[area of property]/ for the first property in that area right. Now I get a different property in that same area and the URL will have to be named /blah-blah-blah-[area of property]-2/. Now I'm not sure if this is a major issue or not, but I'm sure there must be a better way than this, and I don't really want to take down our past properties - unless you can give me good reason too, of course? So before I start getting URLs like this: /blah-blah-blah-[area of property]-2334343534654/ (well, ok, maybe not that bad! But you get my point) I wanted to see what everyones opinion on it is 🙂 Thanks in advance!
Intermediate & Advanced SEO | | JonathanRolande0 -
Exact keyword URL or not?
Hi all, I have a quick question about the proper use of permalinks. Let's say that I have a website about sports and I want to create an internal page dedicated to shoes. I know that the keyword "shoe" has 15.000 monthly visits, while the keyword "shoes" has 1.000 monthly visits. How do I have to name the internal page? http://www.example.com/shoe or http://www.example.com/shoes (with a final 's')? I would think that by naming the URL http://www.example.com/shoes, the search engine would consider that page for the keywords "shoe" and "shoes", but I am not sure about it. Should I create a URL that only focuses on one specific keyword ("shoe", in this example) or a URL that may encompass more than one keyword ("shoe" and "shoes")? I hope this is clear. Thank you for your time and help. All best, Sal
Intermediate & Advanced SEO | | salvyy0 -
Hash as a Replacement for Absolute URL in Canonical Tags?
Any idea why companies like Skechers would be doing this: http://screencast.com/t/ooEkATGN7EX ? I suppose it makes sense, but I've never seen it done before. If this works, why on earth would we be using absolute URLs still?
Intermediate & Advanced SEO | | stevewiideman0