Dumb SEO Questions

(Entry was posted by Dave Elliott on this post in the Dumb SEO Questions community on Facebook, 01/29/2014).

Can you 301 redirect anchor links e.g mysite.com/home.html#aboutus to mysite.com/aboutus and vice versa?

Little question.

Can you 301 redirect anchor links e.g mysite.com/home.html#aboutus to mysite.com/aboutus and vice versa.

A friend of mine is considering making a parallax/one page website and is concerned about how this will work. ?
This question begins at 01:22:54 into the clip. Did this video clip play correctly? Watch this question on YouTube commencing at 01:22:54
Video would not load
I see YouTube error message
I see static
Video clip did not start at this question

YOUR ANSWERS

Selected answers from the Dumb SEO Questions Facebook & G+ community.

  • Dave Elliott: Little question.

    Can you 301 redirect anchor links e.g mysite.com/home.html#aboutus to mysite.com/aboutus and vice versa.

    A friend of mine is considering making a parallax/one page website and is concerned about how this will work. ;
  • Matt Raynes: i can't see any reason why not.. in the .htaccess file you can pretty much request any type of redirect no matter what the original path.. this guy always helped me out ;http://www.lionseo.com/blog/htaccess-redirect-301/
  • Federico Sasso: Not sure if I correctly got the need +Dave Elliott ;
    The problem is browsers don't send the fragment part of the URL (i.e. everything after the # sign) to the web server, which would never receive it in the first place and couldn't redirect it.
    I'm not even sure you can add a fragment in an HTTP request (for example, ajax #! hashbangs are handled replacing the hashbang with "?escaped_fragment=")
  • Brent Wildman: Last time I tried to 301 a URL with a hashtag in it, it wouldn't read anything past the hashtag. This was using the .htaccess as well. I would be curious if anyone has a solution though.
  • Tony McCreath: You can't redirect based on anchor information but you can include a new anchor in the destination.
  • Tony McCreath: A possible solution is to redirect to a page that contains javascript that detects the anchor in the browsers address and then changes the address. Not a redirect but would let you send visitors to a page based on the anchor.
  • Dave Elliott: Hmmm so sounds like going from a standard site to a one page is fine but going from a one page site to a standard would be a problem unless you do something a bit clever.

    Food for thought.
  • Brent Wildman: We have a lot of people come to us wanting to move from their terrible Wix sites. Unfortunately, their URL's always look something like this, ;/#!ambulatory-surgery-center-reception/zoom/c1mkq/image22oy. Which makes it difficult.
  • Dave Elliott: You certainly get what you pay for with wix
  • Tony McCreath: If it's a single page controlled by anchors then only the raw page has probably been indexed. So nothing is in the index to 301 redirect out anyhow.

    Google may have picked up the anchors for use in "jump to" rich snippets, but these are rare and nowhere near as valuable as having a page indexed for each section.

    You could update the system to use pushState and unique URLs for each part of the page. Then get the parts indexed via static links or a sitemap.

    It's tricky to make each new URL return the right static content for the bots while still function as expected for users.
  • Tony McCreath: Moving away from Wix and the hashbang brings up some interesting issues. These work by reading the content from a different fragment URL which contains just the copy you want indexed for that specific hashbang URL. ;

    So in this case the hashbang URL is indexed but you can't 301 redirect it.

    You can redirect the fragment URL but I suspect this won't help. Maybe the use of a canonical tag in the fragment?
  • Federico Sasso: I think hashbang URLs can be redirected, since the server receives the escaped fragment (i.e. ;?escaped_fragment= )
  • Tony McCreath: +Federico Sasso ;

    A user just requests the #! version so it cannot be server side redirected. ;

    The bot will crawl the ;escaped_fragment but will a redirect there update the publicly visible #! address or just confuse things?

    If you are dropping hashbang based URLs it may work. Have the ;escaped_fragment 301 redirect in the attempt to transfer the index and have the #! page use Javascript to switch to the new address so users are in the right place.

     ;

View original question in the Dumb SEO Questions community on Facebook, 01/29/2014).

All Questions in this Hangout