Hi there! please let me know how to redirect the old domain to the new domain
how to redirect the old domain to the new domain
Collapse
Unconfigured Ad Widget
Collapse
X
-
About redirects:
A redirect occurs when a web server switches a visitor from one web page to another. Creating shorter, simpler-to-remember URLs that redirect to larger URLs is a typical application of redirection. Another usage is to route site users from outdated web pages to more recent ones.
Multiple web pages are redirected using cPanel, and redirections can be either temporary or permanent.
You can use cPanel to redirect the old domain to the new domain:
Step 1: log in to your Cpanel account.
Step 2: Find the "Redirects" function in the "Domains" section.
Step 3:From the drop-down menu, choose the old domain.
Step 4: Choose the redirect type (temporary or permanent).
To specify a permanent redirection, select Permanent (301).
To specify a temporary redirection, select Temporary (302).
Step 5: In the "Redirects to" section, type the new domain's whole URL.
Step 6: Choose the redirect settings (with or without www).
Step 7: (Optional) Select the "Wild Card Redirect" checkbox to redirect subdomains as well.
Step 8: Click "Add" to create the redirect.
Redirecting the old domain to the new domain is a simple process to complete this step.
-
-
Hi ThereOriginally posted by Annie_P View PostHi there! please let me know how to redirect the old domain to the new domain
Here is how you can redirect an old URL to a new one. I will mention the three most popular ways to do it.
htaccess Redirect file of the old domain.
Redirect in Nginx from the old server.Code:RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.olddomain.com$ RewriteRule (.*)$ https://newdomain.com/$1 [R=301,L]
3. Redirect in PHP file on the old domain with the following code.Code:server { listen 80; server_name olddomain.com www.olddomain.com; return 301 https://newdomain.com$request_uri; }
The redirects will permanently redirect all traffic from the old domain to the new domain with a 301 status code, You can verify the URL status code with any online redirect tool alos.Code:<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: https://newdomain.com".$_SERVER['REQUEST_URI']); exit(); ?>
Last edited by admin; 07-25-2023, 12:08 AM.
Comment
-

Comment