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. Link Building
    4. Redirect from a previous url

    Redirect from a previous url

    Link Building
    5 2 161
    • 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.
    • Gokart
      Gokart last edited by

      Hi - newbie question

      I have a customer who's had previous versions of his website.

      Previously it was known as "princess-interiors.co.uk" (been around for a few years) and is now "princess-design.co.uk" (been around also for a few years).

      New site is WordPress - what would be the best way to redirect (I have access to the previous version of the site which is still hosted).

      I expect it's to use 301, but how would I do that (step by step), and does www. versus non-www need addressing (and how).

      Really concerned, as this site has gone to zero organic visits!!

      Hoping somebody can help.

      Thanks

      1 Reply Last reply Reply Quote 0
      • Verve-Innovation
        Verve-Innovation last edited by

        HI Mark,

        What CMS is your Previous version of site ? Is it wordpress or using PHP.  If you find yourself in a situation where you need to redirect a PHP web page that is outside your WordPress installation, you can use a PHP redirect.

        PHP redirect.

        You can redirect a PHP page by adding this line of code to the header:

        header("HTTP/1.1 301 Moved Permanently");

        header("Location: http://www.yournewwebsite.com");

        ?>

        Note that the “301 Moved Permanently” line is necessary to advise search engines that you are using a 301 redirection. You also need to ensure that this code is placed at the top of the page to ensure the redirection works correctly.

        If you would like to use redirection within a theme or plugin you are developing, you can use the WordPress wp_redirect function.

        Redirect a Page Using a WordPress Plugin:

        One easy solution is Quick Page/Post Redirect Plugin. The plugin allows you to perform 301, 302, 307, or meta refresh redirects. Redirection is a another great plugin that features 404 page monitoring. It will show you exactly what pages are generating 404 page errors and allow you to create 301, 302, and 307 redirects, for each of those links.

        1 Reply Last reply Reply Quote 0
        • Gokart
          Gokart last edited by

          Hi - thanks for the reply

          The previous site was html - there are two points...

          1. I understand that it's best to map each page using a 301? - do I do that on the previous website?

          2. should I redirect to www or non-www version of new site?

          Cheers

          M

          Verve-Innovation 1 Reply Last reply Reply Quote 0
          • Verve-Innovation
            Verve-Innovation @Gokart last edited by

            Hi Mark,

            1. Yes, You have to do that in Previous website from where you want the redirection to happen.

            2.  Anything whichever works best for you. But Fix one and work on it. check in google which version of your site is indexed more by "site:www.domain.com" and "site:domain.com" . Its easy to decide this way.

            Note: Since its wordpress you can do it in the wordpress settings back end.

            Related Thread here :

            https://moz.com/community/q/changing-url-from-non-www-to-www

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

              Sorted - thanks

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              • First post
                Last post
              • Automatic Redirect
                VillasDiani
                VillasDiani
                0
                9
                157

              • How to build links for a domain name that is redirected to another url?
                dasdeepak
                dasdeepak
                0
                7
                283

              • Same Page, Multiple URLS- Canonical tag? Redirect?
                Telikin
                Telikin
                0
                3
                1.2k

              • How to find all banklinks for a URL that forwards to a main URL
                realpage
                realpage
                0
                4
                549

              • Set a desination url to text that did not have it previously
                VinceWicks
                VinceWicks
                0
                5
                543

              • Should I use a branded url or an exact match, and which branded url?
                mosaicpro
                mosaicpro
                0
                2
                682

              • Redirecting
                wildnerakademie
                wildnerakademie
                0
                8
                825

              • Redirect
                goodnewscowboy
                goodnewscowboy
                0
                4
                1.0k

              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