Completely redirect website (with 301 redirect?) (4 posts)

  1. Imenicaa
    Posted 1 year ago #

    Hello folks!

    I have a website http://www.olddomain.com, and i want to completely move it to new domain www.(newdomain.com).
    I will create new copy of the website on the new domain and want to delete the old WP site once i do that.

    Now, i dont know how can i redirect all the traffic from old site to the new one?
    So, that people get redirected like this:

    Maybe this is stupid questions, but any help would be greatly appreciated

  2. hostknox
    Posted 1 year ago #

    You can place a simple redirect directive in the .htaccess file that's in the root WordPress folder of the old site. In the .htaccess file that's in the public_html folder on your hosting account (assuming that's the root WordPress folder) put the following directive:

    Redirect / http://newdomain.com

    Hope this helps.

  3. Imenicaa
    Posted 1 year ago #

    It does help, thank you a lot :D
    Now, 2 more linked questions lol

    1)Old website is in the public_html, but the new site will be placed in the public_html/newsite. Will this still work?
    2)What about SEO, will this redirection have any affect on the rankings?

    Once again, thanks a bunch

  4. hostknox
    Posted 1 year ago #

    If you place the new website in a subfolder you should reflect that in the destination URL of the redirect command, so that the URL corresponds to the location of the new site on your hosting account. Using your example, the command should be:

    Redirect / http://newdomain.com/newsite

    Regarding SEO, by default the redirect is a temporary one (302 HTTP status code). With temporary redirects page ranking is not passed from the old to the new page. While with a permanent redirect (301 HTTP status code) the page rank is passed to the new page(s); some page ranking percentage may be lost though. So if you don't plan to go back to the old site/domain you should use a permanent redirect. To do this put the status code right after the directive:

    Redirect 301 / http://newdomain.com/newsite

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Topic