Redirects send visitors and search engines from one URL to another. They are commonly used when you move a page, change your domain, or want to consolidate traffic.
Types of Redirects
301 Redirect (Permanent): Tells browsers and search engines that the page has permanently moved to a new location. Search engines transfer the ranking authority to the new URL. Use this when the change is permanent.
302 Redirect (Temporary): Indicates a temporary move. Search engines keep the original URL indexed. Use this for maintenance pages or A/B testing.
Method 1: Control Panel Redirect Tool
The simplest way to set up a redirect:
1. Log in to your control panel.
2. Navigate to the "Redirects" section.
3. Select the redirect type (301 or 302).
4. Enter the source URL (the old address).
5. Enter the destination URL (where visitors should go).
6. Choose whether the redirect applies with or without "www."
7. Click "Add" or "Save."
Method 2: .htaccess File
For more control, edit your .htaccess file in the public_html directory:
Redirect a single page:
Redirect 301 /old-page.html https://yourdomain.com/new-page.html
Redirect an entire domain:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [L,R=301]
Force HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Redirect www to non-www:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com [NC]
RewriteRule ^(.*)$ https://yourdomain.com/$1 [L,R=301]
Method 3: Domain Forwarding
If you want to redirect an entire domain without hosting:
1. Go to your domain management settings.
2. Find "Domain Forwarding" or "URL Redirect."
3. Enter the destination URL.
4. Select the redirect type.
5. Save the changes.
Testing Your Redirect
- Open a browser and visit the original URL to confirm it redirects.
- Use an online redirect checker tool to verify the redirect type (301 vs 302).
- Check that all variations (www, non-www, http, https) redirect correctly.
Important: Avoid redirect loops (A redirects to B, and B redirects back to A). This causes an error for visitors and search engines.