The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. How do you 301 redirect URLs with a hashbang (#!) format? We just lost a ton of pagerank because we thought javascript redirect was the only way! But other sites have been able to do this – examples and details inside

    How do you 301 redirect URLs with a hashbang (#!) format? We just lost a ton of pagerank because we thought javascript redirect was the only way! But other sites have been able to do this – examples and details inside

    Intermediate & Advanced SEO
    9 5 7.9k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DA2013
      DA2013 last edited by

      Hi Moz,

      Here's more info on our problem, and thanks for reading!

      • We’re trying to Create 301 redirects for 44 pages on site.com.
      • We’re having trouble 301 redirecting these pages, possibly because they are AJAX and have hashbangs in the URLs.
      • These are locations pages. The old locations URLs are in the following format: www.site.com/locations/#!new-york and the new URLs that we want to redirect to are in this format: www.site.com/locations/new-york
      • We have not been able to create these redirects using Yoast WordPress SEO plugin v.1.5.3.2.
      • The CMS is WordPress version 3.9.1
      • The reason we want to 301 redirect these pages is because we have created new pages to replace them, and we want to pass pagerank from the old pages to the new. A 301 redirect is the ideal way to pass pagerank.
      • Examples of pages that are able to 301 redirect hashbang URLs include http://www.sherrilltree.com/Saddles#!Saddles and https://twitter.com/#!RobOusbey.
      1 Reply Last reply Reply Quote 0
      • KevinBudzynski
        KevinBudzynski last edited by

        I may be wrong, but I don't believe you can do this via a 301 redirect. How did you know the examples used a 301 redirect? The examples provided may have used JavaScript to do it (may not be the best, but can't think of any other option).

        1 Reply Last reply Reply Quote 1
        • Andy.Drinkwater
          Andy.Drinkwater last edited by

          The hash tag means that the page wont be indexed by Google and therefore, carry no page rank. It is like it is invisible. Just launch the new pages because Google will have never seen the current ones.

          -Andy

          spencerhjustice 1 Reply Last reply Reply Quote 1
          • KevinBudzynski
            KevinBudzynski last edited by

            With the JavaScript option, people who bookmarked the page will get redirected.

            1 Reply Last reply Reply Quote 1
            • DA2013
              DA2013 last edited by

              Thanks for the responses!

              @Kevin: Our main concern here is getting back that lost page rank, since javascript redirects don't pass page rank. We used http://www.internetofficer.com/seo-tool/redirect-check/ and _SEO Tools for Excel _to check whether the hashbang URL examples were using 301 redirects.

              The correct URLs are

              http://twitter.com/#!RobOusbey
              http://www.sherrilltree.com/Saddles/#!Saddles

              @iNetSEO

              These pages were indexed by Google before somehow, I suspect using escaped_fragment? the hashbang URLs would show up in search results

              Andy.Drinkwater spencerhjustice 2 Replies Last reply Reply Quote 0
              • Andy.Drinkwater
                Andy.Drinkwater @DA2013 last edited by

                That will teach me to skim read 😄

                Perhaps trying a different 301 plugin will help? Alternatively, you can pretty much redirect anything from within .htaccess.

                This page on Webmaster World might be worth reading.

                -Andy

                1 Reply Last reply Reply Quote 1
                • spencerhjustice
                  spencerhjustice @Andy.Drinkwater last edited by

                  That's not true. Google is able to crawl and index properly setup ajax based pages like the one in question. Bing on the otherhand is not able to do so or at least not last time I checked.

                  1 Reply Last reply Reply Quote 0
                  • spencerhjustice
                    spencerhjustice @DA2013 last edited by

                    I would like to point out that twitter is using javascript redirects not serverside redirects. If you disable javascript and try that url it will load the homepage/ your twitter feed and the url will stay the same.

                    The second url doesn't seem to be properly redirecting as at least for me it just 301 redirects back to itself.

                    1 Reply Last reply Reply Quote 1
                    • JamesTDG
                      JamesTDG last edited by

                      The solution I came up with was:

                      1. Create a list of all the source URLs you have, and all the destination URLs you want
                      2. Create all the destination URL pages
                      3. Work out what the Ugly versions of all hashbang (pretty) URLs should be and record them (ref: https://developers.google.com/webmasters/ajax-crawling/docs/specification)
                      4. Implement 301 Redirects for the Ugly URLs
                      5. Deploy a Sitemap with Pretty URLs
                      6. Submit Your Sitemap to Google Webmaster Tools
                      7. Wait for Google to re-index all your pages
                      8. Check that the new URL(s) show up in Google search results too
                      9. Clean up – Remove the pretty URLs from the sitemap

                      Job done!

                      I created a detailed page on this with examples on my blog at www.thedriversgarage.com/web-technology/redirecting-hashbang-urls-wix-urls/

                      Disclaimer - Make your own enquiries and do your own tests.  I'm a pragmatist, I really don't care if this complies to standards.  It worked for me and that's all I cared about.  Google, etc. may process this stuff differently in the future. Do your own tests.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      • Moving html site to wordpress and 301 redirect from index.htm to index.php or just www.example.com
                        zeehj
                        zeehj
                        0
                        4
                        1.3k

                      • Going from 302 redirect to 301 redirect weeks after changing URL structure
                        vcj
                        vcj
                        0
                        2
                        131

                      • New Site (redesign) Launched Without 301 Redirects to New Pages - Too Late to Add Redirects?
                        BeanstalkIM
                        BeanstalkIM
                        0
                        8
                        732

                      • Is 1:1 301 redirect required on indexed URL when restructing URL even if the new URL is canonicalized?
                        EricaMcGillivray
                        EricaMcGillivray
                        0
                        2
                        138

                      • Why is this url redirecting to our site?
                        CommT
                        CommT
                        0
                        11
                        718

                      • Should I just redirect all my sites to my main site.
                        cibble03
                        cibble03
                        0
                        3
                        90

                      • How is my 301 redirected site stealing rankings from the main site?
                        TakeshiYoung
                        TakeshiYoung
                        0
                        4
                        127

                      • 301 Redirect To Another 301 Redirect
                        cbielich
                        cbielich
                        0
                        5
                        247

                      Get started with Moz Pro!

                      Unlock the power of advanced SEO tools and data-driven insights.

                      Start my free trial
                      Products
                      • Moz Pro
                      • Moz Local
                      • Moz API
                      • Moz Data
                      • STAT
                      • Product Updates
                      Moz Solutions
                      • SMB Solutions
                      • Agency Solutions
                      • Enterprise Solutions
                      • Digital Marketers
                      Free SEO Tools
                      • Domain Authority Checker
                      • Link Explorer
                      • Keyword Explorer
                      • Competitive Research
                      • Brand Authority Checker
                      • Local Citation Checker
                      • MozBar Extension
                      • MozCast
                      Resources
                      • Blog
                      • SEO Learning Center
                      • Help Hub
                      • Beginner's Guide to SEO
                      • How-to Guides
                      • Moz Academy
                      • API Docs
                      About Moz
                      • About
                      • Team
                      • Careers
                      • Contact
                      Why Moz
                      • Case Studies
                      • Testimonials
                      Get Involved
                      • Become an Affiliate
                      • MozCon
                      • Webinars
                      • Practical Marketer Series
                      • MozPod
                      Connect with us

                      Contact the Help team

                      Join our newsletter
                      Moz logo
                      © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                      • Accessibility
                      • Terms of Use
                      • Privacy