1. Home
  2. Knowledge Base
  3. Website
  4. Website Tips
  5. How to redirect a domain name to another domain name via cPanel

How to redirect a domain name to another domain name via cPanel

A redirect is a way to send both users and search engines to a different URL from the one they originally requested. The three most commonly used redirects are 301, 302, and Meta Refresh. The following KB help you to setup the redirection from one domain to another domain using .htaccess.

Step 1: Login to your Oryon cPanel
Step 2: Go to the ‘Files’ section and click File Manager.
Step 3: Now, 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.
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 //
RewriteCond%{HTTP_HOST} ^olddomainname.com
RewriteRule ^(.*) http://newdomainname.com/$1 [P]
+++

Step 7: Now save the .htaccess file and check the redirection status via browsers

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support