Domain redirection is a method that redirects a website to another website when visiting a web page. Sometimes, the website administrators need to redirect or forward the domain to another domain but without changing the URL of it. It means that the website content of another domain will be presented to the current website owners.

This tutorial will help to redirect your existing domain to another domain but without changing the URL of the website. It helps the user to display similar website content without changing the website URL. Let us see the below steps to enable domain redirection without changing the URL.

Follow the below steps to do the redirection: 

Step 1: Login to your cPanel.

Step 2: Navigate to the Files Section and click File Manager.

Step 3: Go to the pulic_html folder.

Step 4: Now open the .htaccess file located in the public_html directory.

Step 5: Right-click the .htaccess file and click the edit button. A pop-up page will occur and click the “Edit” Button. You can also use the FTP client manager to access the cPanel and make the changes.

Step 6: Add the following line of code in the .htaccess file to redirect your old domain to a new domain without changing the URL.
RewriteEngineOn // This line starts the Apache rewrite module.
RewriteCond%{HTTP_HOST} ^ RewriteRule ^(.*)$1 [P] // This line indicates the redirection from the source domain to the destination domain.

Step 7: Otherwise, you can also redirect a specific page from another domain by adding the below lines to your .htaccess file.
RewriteCond%{HTTP_HOST} ^ RewriteRule ^(.*) [P]

We hope that this tutorial will help you to redirect the domain without changing the URL. For more information, follow us on Twitter and Facebook and For video tutorials, subscribe to our YouTube channel ServerCake India.

Categorized in: