Overview
You must have an active hosting plan for the domain, or the domain must be registered with GreggHost, in order to use the panel Redirect service.
A “redirect” domain is a link to another website. The browser’s URL is changed to the domain to which it is being redirected when browsing a web page on the redirected site. A 301 redirect is produced immediately when you set this up through the GreggHost interface.
This article shows how to use GreggHost to alter a domain or subdomain.
The HTTPS protocol is used in the examples in this article. The domain you’re redirecting to must already have an SSL certificate installed for this to operate. If not, HTTP will suffice.
How does the redirection work?
Your current website and all of its files are not deleted when you use a redirection. You can add hosting to the name at any point in the future, and your original material will be shown.
Any page on your current site (the one to which you are being altered) gets forwarded to the redirected site’s page. Consider the following scenario: you’re forwarding example.com to dreamhost.com. The URL example.com/contact.html becomes dreamhost.com/contact.html when you visit it.
Does redirecting work for the www and non-www versions of the site?
Yes. A redirection set up on example.com will likewise function for www.example.com.
Is there a change in MX records as a result of the redirection?
No. The redirect just alters the website’s hosting location. Your MX records (mail server records) will not be altered in any manner.
Does redirecting work with https (SSL certificate)?
The following sections cover a few alternative configuration options.
Option 1: Redirecting to a different site’s secure version
You can only redirect to a site that already has an SSL certificate installed. Consider the following scenario:
https://dreamhostexample.com to http://example.com
You must first install an SSL certificate on the domain (https://dreamhostexample.com) to which you are forwarding. When viewing the redirection, if an SSL certificate is not configured, you will see a Site Not Found message.
Redirecting to the secure version of the same site (option 2)
It is not possible to redirect to HTTPS using the panel’s Redirect option (explained below) because this removes hosting from the domain. Consider the following scenario:
To https://example.com, change http://example.com.
This is also unnecessary because GreggHost automatically changes the URL visitors use to browse your site from HTTP to HTTPS after you apply an SSL certificate to your domain. Your connection will be encrypted thanks to the S. Consider the following scenario:
https://example.com
You don’t need to do anything on your end to force your site to utilize the secure URL. However, in rare circumstances, creating your own custom configuration file to compel the redirect from HTTP to HTTPS may be necessary.
If your website requires particular code to force the redirect, you’ll need to add custom code. If that’s the case, you’ll need to disable the automated redirect in your panel first.
Disabling the automatic HTTPS redirection
After you’ve disabled it, you may upload your custom redirect file.
Redirecting a new domain or subdomain (legacy)
Go to the Manage Domains section.
The page Manage Domains appears.
Domain redirection
Add Hosting to a Domain / Sub-Domain by clicking the Add Hosting to a Domain / Sub-Domain button.
To get to the Redirect section, go to the bottom of the page and scroll down.
Domain redirection
Fill in the blanks with the following information:
Enter the new domain or subdomain you’d like to redirect to somewhere else.
Redirect to URL – this is the URL to which you want to redirect this new domain or subdomain.
To finish the setup, click the Redirect this domain button.
Adding a redirection to an existing domain or subdomain
Go to the Manage Websites section.
To make changes to your site’s settings, click the Manage option.
Hover over your domain in Grid view and click the Manage option.
Click the Manage button to the right of your domain in List view.
panel-websites-redirect-01.png
Toggle to the Hosting tab.
panel-websites-redirect-02.png
Scroll down to the Redirect Domain box and press the right-hand down arrow.
panel-websites-redirect-03.png
In the ‘Destination URL:’ column, type the URL to which you want this domain to redirect.
To finish the setting, click the Redirect Domain button.
Creating a subdirectory redirect
If you need to redirect to a subdirectory of another site, make sure the redirected URL has a trailing forward slash. The URL will not redirect appropriately if you do not do so.
panel-websites-redirect-04.png
If your site is example.com and you want to redirect to a subfolder of another site called dreamhostexample.com/blog, make sure your redirection looks like this:
dreamhostexample.com/blog/
Any files viewed within that subdirectory will not load if the forward slash is not added, as the URL will be wrong.
A redirection to a subdirectory of the same website is not possible.
Turning off a Redirection
You must alter the hosting configuration to any other option, such as ‘Fully Hosted’ or ‘DNS Only’, to disable a alter. Instructions can be found in the following articles:
How can I add a domain to my account?
Overview of the Mirror Domain
Domain that has been parked
Changing your domain’s DNS settings to ‘DNS Only’
How long will it take for the alter to work?
Redirecting your site is as simple as changing your DNS. This implies that before you can view the changes online, the DNS must propagate first. This shouldn’t take more than 6 hours in general. You can use one of the following links to keep track of when new DNS entries are updated in various locations:
whatsmydns.net – A well-known website that verifies DNS records all around the world.
Using GreggHost’s DNS propagation checker in the panel to view your GreggHost DNS entries.