Redirecting One Domain to Another
A domain redirect automatically sends visitors from one domain to a different URL. This is useful when you own multiple domains and want them all to lead to your primary website.
Types of Redirects
- 301 Redirect (Permanent): Tells search engines that the domain has permanently moved. SEO value is transferred to the destination URL. Use this for most situations.
- 302 Redirect (Temporary): Tells search engines the redirect is temporary. SEO value is not transferred. Use this only for short-term redirects.
Method 1: Domain Forwarding in Client Area
- Log in to your SillyHost client area.
- Go to Domains > My Domains and select the domain.
- Click the Forwarding or Redirect tab.
- Enter the destination URL (e.g.,
https://www.primarydomain.com). - Choose 301 (Permanent) or 302 (Temporary).
- Save your changes.
Method 2: Using .htaccess
If both domains are on the same hosting account, you can create a redirect using an .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
RewriteRule (.*)$ https://www.newdomain.com/$1 [R=301,L]
Method 3: DNS-Level Redirect
If you are using Cloudflare, you can set up redirects using Page Rules without needing a hosting account for the redirected domain. This is efficient and does not require server resources.
Best Practices
- Always use 301 redirects for permanent changes to preserve search engine rankings.
- Redirect to the full URL including
https://to avoid unnecessary redirect chains. - Test the redirect after setup to ensure it works correctly.