URL redirects allow you to automatically send visitors from one web address to another. You can redirect an entire domain, a specific page, or a directory to a new location. This is useful when you want to create shorter, memorable URLs for long page addresses, when you've moved content to a new location, or when you're rebranding your website. The Redirects interface in cPanel makes setting up these redirects straightforward, even for non-technical users.
Understanding URL Redirects
A redirect is an instruction that tells web browsers and search engines that a webpage has moved to a different URL. When someone tries to visit the old address, they're automatically sent to the new one. This happens instantly, so visitors don't notice any interruption.
There are two main types of redirects you can create:
- Permanent (301) Redirect: This tells browsers and search engines that the page has permanently moved to a new location. Search engines will update their indexes, and browsers will remember the new location. Use this when you've permanently moved content.
- Temporary (302) Redirect: This indicates a temporary move. Browsers won't update bookmarks, and search engines will continue to index the original URL. Use this for short-term redirects, such as during website maintenance or seasonal campaigns.
Important note: You cannot edit an existing redirect in cPanel. To modify a redirect, you must delete the old one and create a new one with the updated settings.
How to Create a Redirect
Setting up a redirect in your OBHost cPanel account is a simple process. Follow these steps:
- Choose the redirect type: Select either Permanent (301) or Temporary (302) from the Type menu, depending on whether your redirect is permanent or temporary.
- Select the domain: Choose the domain you want to redirect from the dropdown menu. You can also select "All Public Domains" to redirect all domains in your cPanel account to the same destination.
- Enter the path: In the next text box, enter the specific page or directory path you want to redirect. For example, if you want to redirect http://example.com/old-page.html, you would enter "old-page.html" in this field. Leave it blank to redirect the entire domain.
- Enter the destination URL: In the "Redirects to" field, type the complete URL where you want visitors to be sent. You must include the protocol (http://, https://, or ftp://). For example: https://example.com/new-page.html
- Configure www settings: Choose how the redirect handles the www prefix:
- "Only redirect with www" redirects only visitors who type www. before the domain name
- "Redirect with or without www" redirects all visitors regardless of whether they use www.
- "Do Not Redirect www" does not redirect visitors who use the www. prefix
Note: The www setting is disabled if you selected "All Public Domains" in step 2.
- Enable Wild Card Redirect (optional): Check this option if you want to redirect all files and subdirectories to matching filenames in the new location. For example, if you redirect example1.com to example.com with wildcard enabled, then example1.com/photo.jpg will redirect to example.com/photo.jpg automatically.
- Complete the setup: Click the "Add" button to create your redirect. The system will add the redirect rules to your server configuration.
Common Redirect Scenarios
Shortening Long URLs
If you have a page with a lengthy URL like https://example.com/products/category/subcategory/item-name.html, you can create a redirect from a shorter, memorable URL like https://example.com/special-offer to make it easier for visitors to access and share.
Moving to a New Domain
When rebranding or changing your domain name, set up a permanent 301 redirect from your old domain to your new one. This ensures visitors and search engines are automatically directed to your new site, preserving your search rankings and customer access.
Consolidating Multiple Domains
If you own several domain names that point to the same content, you can redirect them all to your primary domain. This helps avoid duplicate content issues and strengthens your main domain's search engine presence.
Fixing Broken Links
When you reorganize your website and pages move to new locations, create redirects from the old URLs to the new ones. This prevents visitors from encountering "404 Not Found" errors when clicking old bookmarks or links from other websites.
Best Practices for URL Redirects
Always use permanent (301) redirects for content that has permanently moved. Search engines treat these as signals to transfer ranking power from the old URL to the new one. Reserve temporary (302) redirects for truly temporary situations.
When entering destination URLs, always include the full protocol (https:// is recommended for security). Test your redirects after creating them by visiting the old URL in a browser to confirm visitors are sent to the correct destination.
Avoid creating redirect chains where one redirect points to another redirect. This slows down page loading and can confuse search engines. Always redirect directly to the final destination URL.
Frequently Asked Questions
Can I redirect just part of my website while keeping other pages the same?
Yes, you can create redirects for specific pages or directories while leaving the rest of your site unchanged. Simply enter the specific path in the redirect configuration instead of redirecting the entire domain.
Will redirects affect my search engine rankings?
Permanent (301) redirects pass most of the ranking power from the old URL to the new one, so they're safe for SEO when you've moved content. Temporary (302) redirects don't transfer ranking signals because search engines expect the original page to return. Always use 301 redirects for permanent moves to preserve your search rankings.
How do I remove a redirect I no longer need?
In the Redirects interface, scroll down to the "Current Redirects" section where all your active redirects are listed. Find the redirect you want to remove and click the Delete button next to it. The redirect will be removed immediately.
Why isn't my redirect working?
First, clear your browser cache and try again, as browsers sometimes cache redirect information. Verify that you included the protocol (http:// or https://) in the destination URL. Check that you entered the source path correctly without the domain name. If problems persist, contact support for assistance.
If you need help setting up redirects or have questions about your specific situation, our support team is available 24/7 to assist you. Visit our contact page or email us at support@obhost.org for personalized guidance.