Setting up a redirect allows you to forward visitors from one URL to another automatically. Redirects are commonly used when you want to direct traffic from an old domain to a new one, fix broken links, or set up a more user-friendly URL. With OzSpeed’s hPanel, you can easily configure various types of redirects. Here’s how to do it step-by-step.
Types of Redirects #
Before setting up a redirect, it’s important to understand the different types:
- 301 Redirect (Permanent Redirect):
- Used when a page has moved permanently.
- Tells search engines to update their index to the new URL.
- Best for SEO as it preserves the page’s ranking.
- 302 Redirect (Temporary Redirect):
- Used when a page is temporarily unavailable.
- Does not update the search engine index, as the change is not permanent.
- Meta Refresh Redirect:
- Typically used for a brief redirection delay.
- Not recommended for SEO as it may cause a negative user experience.
Step 1: Log in to hPanel #
- Visit ozspeed.com.au and log in to your hPanel Dashboard using your credentials.
- Navigate to the Domains section.
Step 2: Open the Redirects Tool #
- Click on “Redirects” in the Domains section.
- You will see a form to configure the redirect settings.
Step 3: Set Up the Redirect #
How to Create a 301 (Permanent) Redirect: #
- In the Redirect Type dropdown menu, select 301 (Permanent).
- In the Domain field, choose the domain or subdomain you want to redirect (e.g., yourdomain.com).
- In the Redirect to field, enter the destination URL (e.g., https://newdomain.com).
- Click “Create Redirect”.
How to Create a 302 (Temporary) Redirect: #
- Select 302 (Temporary) from the Redirect Type dropdown.
- Enter the source domain or URL and the destination URL.
- Click “Create Redirect”.
Tip: #
- Use a 301 redirect for permanent URL changes, as it helps maintain SEO rankings.
Step 4: Verify the Redirect #
- Open a new browser window or tab.
- Enter the original URL (the one you redirected).
- Check if it automatically forwards to the new destination URL.
Troubleshooting: #
- If the redirect does not work immediately, it could be due to DNS propagation. Wait for up to 24-48 hours.
- Clear your browser cache or try using an Incognito window to see the changes.
Step 5: Edit or Delete an Existing Redirect #
- Go back to the Redirects section in hPanel.
- You will see a list of active redirects.
- To edit, click on the “Edit” button next to the redirect.
- To delete, click “Delete” and confirm the action.
Tip: #
- Regularly review your redirects to ensure they are still relevant and working correctly.
Additional Redirect Methods #
Using .htaccess (Advanced) #
If you are comfortable editing server files, you can set up redirects directly in the .htaccess file.
- Go to File Manager in hPanel.
- Open the public_html directory and find the .htaccess file.
- Add the following code for a 301 redirect:
apacheCopy codeRedirect 301 /old-page.html https://yourdomain.com/new-page.html
- Save the file and check if the redirect works.
Tip: #
- Be cautious when editing the .htaccess file, as incorrect entries can affect your website’s functionality.
Common Use Cases for Redirects #
- Domain Change:
- Redirect all traffic from oldsite.com to newsite.com using a 301 redirect.
- Fix Broken Links:
- Redirect traffic from deleted or outdated pages to relevant, active pages.
- HTTPS Redirection:
- Redirect all HTTP traffic to HTTPS for secure browsing.
- URL Shortening:
- Create a shorter URL (e.g., yourdomain.com/promo) that redirects to a longer URL (e.g., https://yourdomain.com/long-promotion-url).
Additional Tips: #
- Monitor Redirects: Use Google Analytics or other tracking tools to monitor redirected traffic and check for any issues.
- Test Regularly: Periodically test your redirects to ensure they are still active and correctly configured.
- SEO Considerations: Use 301 redirects for permanent changes to avoid losing search engine rankings.