This article covers the difference between 301 (permanent) and 302 (temporary) redirects, when to use each, and two ways to set them up on your HOSTDOG hosting account: through the Redirects tool in your control panel, or manually via .htaccess rules.
301 vs 302 redirects
The two most common redirect types serve different purposes:
| Type | Name | When to use | SEO effect |
|---|---|---|---|
301 |
Permanent redirect | The old URL is gone for good — a page has moved, a domain has changed, or you are consolidating duplicate content. | Passes most link equity (ranking power) to the new URL. Search engines update their index. |
302 |
Temporary redirect | The old URL will return later — maintenance mode, A/B testing, or a seasonal landing page. | Search engines keep the original URL in their index and do not transfer ranking signals. |
Method 1: Using the Redirects tool
Your hosting control panel includes a dedicated Redirects tool that handles the most common redirect scenarios without editing any files.
Navigate to the HOSTDOG homepage and click the Log in button in the top-right corner. From your client area, go to your hosting service and click Login to Control Panel.
In your control panel, find the Domains section and click Redirects.
Fill in the following fields:
- Type — select Permanent (301) or Temporary (302).
- Domain — choose the domain you want to redirect from (e.g.,
yourdomain.com). - Redirects to — enter the full destination URL, including
https://(e.g.,https://yourdomain.com/new-page). - www. redirection — choose whether the redirect applies to the www version, non-www, or both.
- Wild Card Redirect (optional) — tick this to redirect all pages under the source path to the same structure on the destination.
Click Add. The redirect takes effect immediately. You can test it by visiting the old URL in a browser — it should forward to the new destination. Your existing redirects appear in a list below the form, where you can delete them at any time.
Method 2: Using .htaccess rules
For more control — pattern matching, regex-based rules, or bulk redirects — you can add redirect rules directly to your .htaccess file. This file sits in your site's root directory (public_html) and is processed by the web server on every request.
.htaccess can make your entire site return a 500 error. Always keep a backup of the file before editing. You can use the File Manager or an FTP/SFTP client to edit it.
Common .htaccess redirect examples
Redirect a single page (301):
Redirect 301 /old-page https://yourdomain.com/new-page
Redirect an entire domain to a new domain (301):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
Redirect www to non-www (301):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R=301,L]
Redirect non-www to www (301):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC]
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R=301,L]
Force HTTP to HTTPS (301):
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Temporary redirect (302):
Redirect 302 /sale https://yourdomain.com/seasonal-offer
Troubleshooting
Clear your browser cache first — browsers aggressively cache 301 redirects. Try opening the URL in a private/incognito window. If the issue persists, verify that RewriteEngine On appears before your rewrite rules in .htaccess and that you have not placed rules after a conflicting [L] (last) flag.
This happens when two rules contradict each other — for example, one rule redirects non-www to www while another redirects www to non-www. Check your .htaccess file and any redirects set in the control panel for conflicting rules. Also check your CMS settings (e.g., WordPress Site URL) to make sure they match the redirect destination.
A syntax error in your .htaccess file is the most likely cause. Restore the backup you made before editing. If you do not have a backup, open the File Manager, rename the .htaccess file temporarily (e.g., .htaccess_broken), and your site should come back online. Then review and correct the rules before renaming it back.