I have a website which is on Wordpress www.old.example.com and on its own IP/Server

It has various pages which are ranked on google which I'd like to preserve.

I have a new website www.new.example.com which is configured using APACHE2 Vhosts and is also on its own IP/Server

How do I do 301 redirects? Do I do the 301 redirects in Wordpress on www.old.example.com or do I change its IP address to point to the new server and then do the redirects in the www.new.example.com .conf file?


Either way works fine. First one is easier, you can just add the redirects.

Using the second option requires you to set up virtual hosts on the new server.


I would prefer the redirect option because you can redirect the whole site or a specific section.


<VirtualHost *:80>
    ServerName www.old.example.com
    Redirect permanent / http://www.new.example.com/


Redirect [status] [URL-path] URL
  • status: you can move: permanetn, temp, seeother, gone the web page
  • URL-path: Set URI
  • URL: New domain/New web

Doc: more information

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.