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. Redirect help

    Redirect help

    Intermediate & Advanced SEO
    11 3 226
    • 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.
    • _JP_
      _JP_ last edited by

      I think it would depend. Where is your website hosted? On what type of server? There would be a different method for achieving this via Cpanel on a linux server than there would via IIS on a Windows server. etc.

      EcommerceSite 1 Reply Last reply Reply Quote 1
      • StalkerB
        StalkerB last edited by

        Not tested and I'm very sleepy this Friday afternoon, but the below should fix it.

        NB, this will also redirect any subdomains.

        RewriteEngine On RewriteCond %{HTTP_HOST} ^neatstuff.com$ [OR] RewriteCond %{HTTP_HOST} ^www.neatstuff.com$
        RewriteRule (.*)$ http://www.neat-stuff.com/$1 [R=301,L]

        EDIT

        As per JP above, this is a solution using .htaccess. If you're on a Windows server you'll need to use IIS. The below might help

        <match url="(.*)"></match>    
        <add input="{HTTP_HOST}" pattern="^neatstuff.com$"></add> <action type="Redirect" url="http://www.neat-stuff.com/{R:1}}" redirecttype="Permanent"></action>

        But again, I'm sleepy, so test things first 🙂

        EcommerceSite 1 Reply Last reply Reply Quote 1
        • EcommerceSite
          EcommerceSite @_JP_ last edited by

          It is hosted on an IIS Windows server

          _JP_ EcommerceSite 6 Replies Last reply Reply Quote 0
          • EcommerceSite
            EcommerceSite @StalkerB last edited by

            It is hosted on a Windows server. Do you have a similar fix for IIS?

            1 Reply Last reply Reply Quote 0
            • _JP_
              _JP_ @EcommerceSite last edited by

              in IIS for the redirecting website (neat-stuff.com) use this as the Redirect To url:

              http://www.neat-stuff.com$S$Q

              that'll redirect all directories and files as well.

              1 Reply Last reply Reply Quote 0
              • EcommerceSite
                EcommerceSite @EcommerceSite last edited by

                On our old site the categories were /52352524 and one of the things we did on the new site was actually give them names so it is now /category WIll that still work with that?

                Wanted to add that most of our current redirects are done dynamically because we use asp.net so if you go to category 34234 it will take you to the correct /category through a 301 redirect.

                1 Reply Last reply Reply Quote 0
                • _JP_
                  _JP_ @EcommerceSite last edited by

                  You'll have to put individual redirects in place if you want a specific old directory to redirect to a specific new directory. You can set those up in IIS on the www.neat-stuff.com website.

                  Then, if you append the $S$Q to the root of the neat-stuff.com (non-www) website, it should all work fine.

                  This writeup was helpful for me when I learned to set this up.

                  http://www.stronghost.co.uk/Redirecting-non-www-domain-to-www-domain/B23.htm

                  1 Reply Last reply Reply Quote 1
                  • EcommerceSite
                    EcommerceSite @EcommerceSite last edited by

                    Couple of things. We have 20k pages or so. Individually redirecting that much would be a pain.

                    After working with some people we now have it to where www.neat-stuff.com/235425243 category on the new site redirects to www.neat-stuff.com/category on the new site correctly. Same thing with neatstuff.com/4544564 to www.neatstuff.com/category on the new site. Shouldn't it be to one?

                    For the home page both www.neatstuff.com and www.neat-stuff.com work but there is no redirect. When I run a checker it says direct link. I think we are being shown as a duplicate site.

                    1 Reply Last reply Reply Quote 0
                    • _JP_
                      _JP_ @EcommerceSite last edited by

                      As long as all your redirects are already working on the new site, you should be fine.

                      Look into the article I posted above. You essentially need to create a dummy non-www website in IIS that redirects to the new site. Right now you probably just have both the www and non-www versions declared in the host header of the new site.

                      1 Reply Last reply Reply Quote 1
                      • EcommerceSite
                        EcommerceSite @EcommerceSite last edited by

                        That is exactly what we ended up doing thanks for your help.

                        After site launch a few months ago we lost a lot of organic traffic. Think this will bring some of it back?

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        • Help with force redirect HTTP to HTTPS
                          iugac
                          iugac
                          0
                          5
                          122

                        • To redirect or not to redirect, that is the question
                          CommT
                          CommT
                          0
                          5
                          126

                        • Help with https// redirects
                          ForForce
                          ForForce
                          0
                          5
                          317

                        • Help understanding 301 domain redirect
                          Paddy_Moogan
                          Paddy_Moogan
                          0
                          5
                          114

                        • Redirecting a redirect - thoughts?
                          MikeRoberts
                          MikeRoberts
                          0
                          2
                          165

                        • Big 301 Redirect Help!
                          onwebtoday
                          onwebtoday
                          0
                          2
                          98

                        • 301 redirect on Windows IIS. HELP!
                          TakeshiYoung
                          TakeshiYoung
                          0
                          2
                          222

                        • 301 redirect help
                          Jinx14678
                          Jinx14678
                          0
                          6
                          609

                        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