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. Technical SEO Issues
    4. How to write 301 redirects in WordPress

    How to write 301 redirects in WordPress

    Technical SEO Issues
    12 4 2.4k
    • 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.
    • CaseyKluver
      CaseyKluver last edited by

      Is the old site in WordPress? Try Simple 301 Redirects or a similar plugin to 301 individual pages/posts.

      CeCeBar 1 Reply Last reply Reply Quote 1
      • Georgios
        Georgios last edited by

        I recommend Redirection – it's the most popular plugin out there. I use it on a number of sites and works great.

        CeCeBar 1 Reply Last reply Reply Quote 0
        • CeCeBar
          CeCeBar @CaseyKluver last edited by

          Thanks for your reply.

          The old site theme isn't supported anymore, cannot update WP beyond 2.9.1.

          Does this simple 301 redirect plugin need to be on old site or new?

          So if old domain name is different than new domain name, can I use this plugin?

          _Cindy

          CaseyKluver 1 Reply Last reply Reply Quote 0
          • Brian-M
            Brian-M last edited by

            Cindy as long as your categories and file names are the same, you can just put in 1 (one) wild card redirect that will redirect everything from your old domain to the same file name on your new domain.  i.e. olddomain.com/seo/goodseo.html will redirect to newdomian.com/se/goodseo

            And, the easiest way to do this is from your servers Cpanel.  Go into the cpanel, look for redirect, tell it the old domain and the new domain and tell it to use "wild card" for redirection.

            CeCeBar 1 Reply Last reply Reply Quote 0
            • CeCeBar
              CeCeBar @Brian-M last edited by

              Thank you for answering.

              None of the pages are the same name on new site as on the old site.

              However, the blog posts are the same. And if i could use a redirect for all pages on blog that would help.

              But when I use the cpanel wildcard, or rules to the htaccess file, I do not get one page corresponding to the new page, - all old blog posts go to the home page.

              _Cindy

              Brian-M CeCeBar 3 Replies Last reply Reply Quote 0
              • CeCeBar
                CeCeBar @Georgios last edited by

                So is the redirection plugin installed on the old site (that's a different domain name), and can the target url be an external link?

                The source URL cannot be an external link, right?

                Cindy

                1 Reply Last reply Reply Quote 0
                • Brian-M
                  Brian-M @CeCeBar last edited by

                  You should be able to do something like this: http://screencast.com/t/1kU7rKwiC

                  1 Reply Last reply Reply Quote 0
                  • CaseyKluver
                    CaseyKluver @CeCeBar last edited by

                    Hi Cindy,

                    You can install the plugin on your current setup, and it should work, if by chance it doesnt work, you can download the older versions here which are supported in 2.9.1

                    This plugin allows you to 301 redirect from anywhere on your site to any external link you want 🙂

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

                      Didn't understand the link you gave...

                      1 Reply Last reply Reply Quote 0
                      • Brian-M
                        Brian-M @CeCeBar last edited by

                        Sorry, try that link again (I've edited it)

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

                          OK, so simple 301 redirects seem to be working out fine.

                          But having a thing for a puzzle, and thus far learning more about htaccess, I am wondering why a simple rewrite... or "redirect" rule would not work. Like this:

                          RewriteRule ^(./blog)$ http://cmsearchmarketing.com/blog$1.php [R=301,NC]

                          or this

                          RewriteRule ^./blog$ http://www.cmsearchmarketing.com/blog [R=301,NC]

                          (...and this goes into the old site htaccess with the old domain name, NOT the new site with the new domain name; and the new site basically has all new page names.)

                          Where in the htaccess file would it go... after the WP permalink rule - considering I am using permalinks on the site and writing the rules with the permalink structure?

                          Can I write a rule such as this and redirect to another domain all together?

                          When would I use [L] for last rule?

                          And what's the difference in a rewrite and a redirect?

                          OK, if anyone is pursuing and can help I would appreciate.
                          Thank you very much.

                          _Cindy

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post
                          • Where to put 301 redirects in my Wordpress htaccess file?
                            Benspain
                            Benspain
                            0
                            3
                            34

                          • 301 Redirects Showing As 307 Redirects
                            0
                            1
                            64

                          • Help Setting Up 301 Redirects from Coldfusion Site to Wordpress Site.
                            MarketHubb
                            MarketHubb
                            1
                            3
                            143

                          • How to redirect 302 status to 301 status code using wordpress
                            ThompsonPaul
                            ThompsonPaul
                            0
                            4
                            1.3k

                          • Redirect a 301 Redirect
                            RedCaffeine
                            RedCaffeine
                            0
                            5
                            98

                          • Help writing a .htacess file with the correct 301 redirects
                            mememax
                            mememax
                            0
                            5
                            148

                          • To 301 redirect or not to 301 redirect? duplicate content problem www.domain.com and www.domain.com/en/
                            Chris-CA
                            Chris-CA
                            0
                            5
                            456

                          • Wordpress 301 redirects
                            KeriMorgret
                            KeriMorgret
                            0
                            5
                            916

                          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