WordPress.org

Support

Support » How-To and Troubleshooting » 301 redirect from one domain to another

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.

    Thanks
    Magda

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

    http://www.generateit.net/mod-rewrite/

    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 (.*) http://www.newdomain.com/$1 [R=301,L]

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

    http://www.webconfs.com/how-to-redirect-a-webpage.php

    @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

    <?php
    /* Redirect to new domain, you can enter new domain address in place of {dreamyoucareer.com} */

    header(“Location: http://dreamyourcareer.com/“);

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

    exit;
    ?>

    Write code to .htaccess file

    RewriteEngine on
    RewriteRule (.*) http://www.yournewdomain.com/$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.
Skip to toolbar