Redirect old domain to new

Sometimes you want to change an old domain to a new one, below you'll find how to do it.

First you log into your FTP account, and go to the root of your domain, if it's your primary domain this will usually be public_html, here you want to create (or edit) the file .htaccess (Remember there's a dot in front).

Here you put the following content:

<IfModule mod_rewrite.c>

  RewriteEngine On

  RewriteCond %{HTTP_HOST} ^myolddomain\.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www\.myolddomain\.com$
  RewriteRule (.*)$$1 [R=301,L]

  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Hvordan får jeg fat i min EPP kode?

En EPP kode er en autorisations kode. Det er en kode der beviser at du er ejeren af et domæne....

Jetpack or other plugins can't connect to WordPress

Due to security concerns, we by default block any requests to xmlrpc.php. We do this for a few...

Which port do you use for SSH?

We use port 831 for SSH access.

Which type of hardware do you use?

We've been changing hardware between servers, so below you'll find an overview of which type of...