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. Redirects 301

    Redirects 301

    Technical SEO Issues
    5 4 639
    • 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.
    • PedroM
      PedroM last edited by

      Hello,

      I need to reedirect a URL of a page that I have in my site (http://digitaldiscovery.com.pt/servicos-de-marketing-digital/publicidade-online/) to a new URL with SEO porpuses. Whats the best way to this?

      I use Wordpress btw.

      Tks in advance!

      PP

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

        The best way to do this is by adjusting the .htaccess file. The htaccess file directs traffic to the correct page very quickly and efficiently. (An alternative would be to go through WordPress but typically this isn't an efficient alternative.)

        The htaccess file is located in the root directory - /httpdocs, /public_html, etc.

        At the very end of the htaccess file, add a new line and on that line, you will want to use a line like this. Update the URLs to match whatever you want to redirect from and to.

        redirect 301 /servicos-de-marketing-digital/publicidade-online/ http://digitaldiscovery.com.pt/new-page-url-here

        The first URL (after redirect 301) is the old URL you are redirecting from. This needs to be a relative URL back to the root directory of the website. The second URL (after the space) is the URL to the new page you are redirecting to. This needs to be an absolute URL (even if it is on the same site).

        A couple words of warning on the htaccess file:

        First, make sure your URLs do not have any special characters and if they do, make sure you escape them. (Space becomes %20, for example.)

        Second, before making any changes to your htaccess file definitely create a backup of what the current htaccess file is. If you make a mistake in the htaccess file it can return an internal server error for your entire site. So, be prepared to roll back if something doesn't go quite right! 🙂

        There is a good resource on htaccess 301 redirects here. It also talks about a meta refresh option but I'd avoid that as it isn't as good for search engine purposes.

        http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

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

          An htaccess file is one way to do it as a previous response suggested, but there are some easier options. If you're already using an SEO plugin on your Wordpress site, check to see if it has a 301 redirect field and then go enter the new url you'd like it redirected to on the post or page. If you don't have an SEO plugin or one with that option you can easily install a new redirect plugin. I've used "Quick Page/Post Redirect DEV" and I'd recommend it. This also allows you to copy and paste the new url in a field on the post or page and choose the type of redirect you'd like. Make sure to do a 301 if this is a permanent change.

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

            Hi Pedro,

            I agree with the replies so far. 301 is the best for SEO.

            If you already have a .htaccess file then just put one more line into it, similar to the following

            redirect 301 ./my-page.html http://www.mysite.com.au/my-new-page.html

            If you don't then just make a plain text file and name it .htaccess, put this code into it, and then ftp it to the root of your site.

            It will all just work like magic if you have an Apache server or similar. If you have a windows server or something else, then you may in for some more legwork to get the redirect to work.

            This is the best approach for non cms websites. For websites like Wordpress you have many more options available through plugins... Yay...!

            HTH

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

              Awesome guys. I think I can manage from here. Tks alot for sharing the knowledge 🙂

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • 301 Redirects
                industriestaedt
                industriestaedt
                0
                2
                36

              • Redirect a 301 Redirect
                RedCaffeine
                RedCaffeine
                0
                5
                98

              • Where is the 301 redirect?
                JarnoNijzing
                JarnoNijzing
                0
                2
                189

              • 301 redirects reverting to 302 redirects
                Devanur-Rafi
                Devanur-Rafi
                0
                6
                532

              • 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

              • Delete 301 redirected pages from server after redirect is in place?
                RuthBurrReedy
                RuthBurrReedy
                0
                5
                4.0k

              • 301 Redirect
                Uramark
                Uramark
                0
                3
                318

              • 301-redirect
                KeriMorgret
                KeriMorgret
                0
                14
                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