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

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...

Jetpack or other plugins can't connect to WordPress

Short version:In the root of your main FTP account, you'll find an .htaccess file - in this file...

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....

Screaming Frog SEO Crawler blocked

Due to a bug in Screaming Frog SEO crawler that causes the crawler to not work correctly with...