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]

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How often do you take backups?

We do daily backups of files, databases, SSL certificates, Cronjobs and DNS zones - we currently...

Which DNS types do you support

We support A, AAAA, CAA, CNAME, MX, SRV and TXT types.A: Used for IPv4AAAA: Used for IPv6CAA:...

Redirect http to https

If you want to redirect http to https for your website, you can insert the following code in the...

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

What is your nameservers?

We use a total of 4 nameservers for our hosting platform:ns1.dkns2.dkns3.dkns4.dkWe do advise...