Root domain redirect from Subfolder


Redirect requests with .htaccess

Redirect “ALL” requests to a domain to a subdirectory

You can redirect all requests to a subdirectory by adding an .htaccess file to the root of your domain’s directory:

  1. Visit the FTP page for instructions on how to upload.
  2. Once connected, upload (or create) a text file named .htaccess (with no extension).
  3. Make sure it’s uploaded to your domain’s directory such as
  4. Add the following content to this .htaccess file:

Redirecting to a different domain

So the example below is redirecting all URLs from to, this is also the 301 redirect to use when using Googles Change of Address tool in Search Console.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ [NC,OR]
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301,NC]

The above will use the non-www as preference.