Website redirect to new domain

Website redirect to new domain

So you have a website on Domain A and you want to redirect all traffic including sub pages to Domain B. Eg. domain-A/contact > domain-B/contact

So what you would need to do is the following:

  1. Point Domain A at Domain B’s web server

  2. Add Domain A to Domain B’s web account as an addon/alias domain

  3. Create entry in .htaccess file on web server of Domain B to setup the redirect as follows

    #BEGIN Domain Redirect
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^domain-a.com$ [NC]
    RewriteRule ^(.*)$ https://domain-b.com/$1 [R=302,L]
    #END Domain Redirect

    Note: This creates a temporary redirect. If you want to create a permanent redirect change [R=302,L] to [R=301,L] - The change to permanent cannot be undone, so proceed with caution.

    • Related Articles

    • How to show the From field in the new Outlook for Windows

      Open Outlook for Windows (New Outlook). Click “New Mail” to start a new message (or open a reply/forward). In the new message window — go to the “Options” tab on the ribbon. Look for a button labelled “From” (under a group called “Show Fields” or ...
    • How to Delete a Website in Guarana Hosting

      Go to Guarana Hosting Click on Websites Click on search Search for the website to delete Click on menu Click on Delete
    • How to access website via FTP

      1. Login to the control panel https://control.guarana.host 2. Go to the menu and select Advanced > FTP 3. Click Add Account 4. Add a Username, Password and Directory then click "Add" 5. Connect to FTP via either FTP or FTPS protocols via your ...
    • How to access a delegated inbox in Gmail

      The purpose of delegating access to inboxes in Gmail is that you only need to know your own login to your inbox instead of sharing passwords which creates a security issue. Switch to the delegated inbox (desktop) Go to https://mail.google.com In the ...
    • The Simple Rule for Nameservers vs DNS Records

      Many people confuse where nameservers are set and where DNS records are edited. They are two different systems that work together. 1️⃣ Domain Registrar (Where Nameservers Are Set) Your domain registrar (where the domain was purchased) is where you ...