Browse by Popular
Domain Name
- What is a domain name?Eligibility criteria for registering .AU domain namesPremium domain names explained
Web Hosting
View AllEmail Hosting
View AllGoogle Workspace
- Getting Started with Google WorkspaceGoogle Workspace support resourcesTransferring an existing Google Workspace service to VentraIP
Account
- How do I reset my VIPcontrol password?How do I create a VentraIP account?How can I see who accessed my VentraIP account?
Troubleshooting
- How do I clear my browser cache?Troubleshooting a ‘500 internal server' errorTroubleshooting with a ping test
Create redirects using the .htaccess file
Using the inbuilt cPanel tools
If you’d prefer to add simple redirects, cPanel has an inbuilt redirect tool that will do this for you.
If you want to do anything that is outside of the fairly basic functionality of the cPanel redirect tool, you may want to consider manually editing your .htaccess file to create more advanced redirects.
Adding redirects manually
Your .htaccess files provide a means to make configuration changes in how directories/files route. With this file you can redirect certain requests – such as force visitors to the HTTPS version of your site.
This file is usually located in your public_html directory, as well as the root directory for any add-on or sub-domains. Redirects added this way should be placed at the top of your .htaccess file, as the file itself is read top-down.
Here are a few of the most common uses of these types of redirects:
Force your site to load securely
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Rewrite a directory to be SSL/HTTPS access only
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*)$ https://www.mywebsite.com/directory [R,L]
Rewrite a specific file in a directory to be SSL/HTTPS access only
RewriteEngine on
RewriteCond %{SERVER_PORT} !443
RewriteRule ^specificfile.php$ https://www.mywebsite.com/directory/specificfile.php [R=301,L]
Rewrite the URL to force visitors to ‘www.’
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.mywebsite.com [NC]
RewriteRule ^(.*)$ http://www.mywebsite.com/$1 [R=301,L]
Redirect any request for the root directory to forward to a subdirectory
RewriteEngine on
RewriteCond %{HTTP_HOST} www.example.com [NC]
RewriteCond $1 !^test/
RewriteRule ^(.*)$ http://www.example.com/test/$1 [L]
Redirect ‘yourdomain.com’ to ‘subdomain.yourdomain.com’
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule ^directory(.*) http://subdomain.yourdomain.com$1 [R=301,L]
Redirect ‘www’ to ‘subdomain.yourdomain.com’
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^(.*) http://subdomain.yourdomain.com/$1 [R=301,L]