Support » Fixing WordPress » 301 redirect from one domain to another

  • Hi

    I’ve moved my blog from one website to another and need to set up 301 redirect. No idea how to do it. Your help will be appreciated.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Nifty tool:

    That said, the 301 redirect needs to be present at former hosting account and this simple .htaccess rewrite rule covers a domain change (for example all posts/pages/tags/archives/etc. are the same only the domain has changed…

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*)$1 [R=301,L]

    Again, this rule is at OLD domain and of course we update above rule with actual url of new domain.

    @seacoast Web Design – thank you so much for posting the .htaccess code. I have the same situation as magdabis posted about; it’s great to find such a quick solution to making sure that any traffic to my blog’s old location will automatically redirect to the new one. The .htaccess solution works like a charm!

    you can simply put this code in the header.php of your theme. between <head> put code here </head> tags

    /* Redirect to new domain, you can enter new domain address in place of {} */


    /* Make sure that code below does not get executed when we redirect. */


    Write code to .htaccess file

    RewriteEngine on
    RewriteRule (.*)$1 [R=301,L]
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘301 redirect from one domain to another’ is closed to new replies.