This type of redirection is called a 301 Permanent Redirect
This is the most common type of redirect and is useful in most situations using the file in the root of the file directory.
In this example, we are redirecting to the “codehaven.co.uk” domain.
Use a 301 redirect .htaccess to point an entire site to a different URL on a permanent basis.
When adding the following to your website’s .htaccess file, be sure to replace codehaven.co.uk with your own domain name.
1 2 3 4 |
# This allows you to redirect your entire website to any other domain Redirect 301 / https://www.codehaven.co.uk/ |