What are HTTP Redirection Records?
For any redirects that point outside of your FQDN, you need to use a special kind of DNS record called an HTTP Redirection record.
These records are actually an A record that points to a dedicated web server containing the 301 redirect to the external FQDN.
Types of Redirects:
There are three types of HTTP Redirections to choose from in the Control Panel.
Frame Masked (Hidden) Redirection will make it so that the contents of the website you redirect to will be displayed in a web frame and your domain name will remain in the URL bar of the user's browser. Some functionalities of the website may be prohibited by this type of redirect.
A Standard 301 Redirect is a permanent type of redirection. If your domain will be associated with the desired URL permanently or for an extremely long period of time, you would want to use this type of redirection because search engines will index this redirection.
A Standard 302 Redirect is a temporary type of redirection. If your domain will be associated with the desired URL only temporarily, for example, if your main website is undergoing maintenance and you wish to redirect users to a temporary website, then you would want to use this type of redirection because search engines will NOT index this redirection.
URL Redirection can also be used as a simple fix if your ISP is blocking incoming port 80. First you want to create an A record that points to your IP. Let’s say we create one called ‘www2′. So for this example let’s say that the FQDN is www2.example-1.com. You will then need to find a port that your ISP is not blocking. For this example let’s say that the ISP is not blocking 8889. You will then need to configure your webserver to accept requests on port 8889. You will then create an HTTP Redirection that will send all traffic for www.example-1.com to http://www2.example.com:8889. Now when a user types http://www.example-1.com they will be redirected to http://www2.example.com:8889.
How to Set Up HTTP Redirection Records
1. Navigate to Managed DNS
2. Select your Domain
3. Add the HTTP Redirection Record
Under HTTP Redirection Records click the plus sign to add a new record.
As an example, we will then add an HTTP Redirection record for testserver12.com to http://www2.example.com. The Title, Keywords and Description are only used if you choose the Frame Masked Redirection Type to define those attributes for the frame. When finished, click Submit.
Examples:
Example 1 – A standard 301 HTTP Redirection record for www.example.com to the URL http://www.google.com:
NAME | TTL | TYPE | HARD LINK | REDIRECT TYPE | DATA/URL |
www.example.com | 1800 | HTTPRED | Unchecked | Standard 301 | http://www.google.com |
Configuration:
Example 2 – A standard 302 HTTP Redirection record for www.example.com to the URL http://www.google.com:
NAME | TTL | TYPE | HARD LINK | REDIRECT TYPE | DATA/URL |
www.example.com | 1800 | HTTPRED | Unchecked | Standard 302 | http://www.google.com |
Configuration:
Example 3 – A-Frame Masked HTTP Redirection record for www.example.com to the URL http://www.google.com:
NAME | TTL | TYPE | HARD LINK | REDIRECT TYPE | DATA/URL |
www.example.com | 1800 | HTTPRED | Unchecked | Frame Masked | http://www.google.com |
Configuration:
Example 4 – A standard 301 HTTP Redirection record with Hard Link for www.example.com to the URL http://www.google.com:
NAME | TTL | TYPE | HARD LINK | REDIRECT TYPE | DATA/URL |
www.example.com | 1800 | HTTPRED | Checked | Standard 301 | http://www.google.com |
Configuration:
Record Fields:
- Name: This will be the host for your domain which is actually a computer within your domain. Your domain name is automatically appended to your name. If you are trying to make a record for the system www.example.com. Then all you enter in the text box for the name value is www.
Note: If you leave the name field blank it will default to be the record for your base domain. The record for your base domain is called the root record or apex record. - URL: This will be the destination URL (uniform resource locator) that our forwarding servers will send requests to.
- Hard Link: When checked, any request that is made for this record will have the path removed after the fully qualified domain name portion of the requested URL. For example, an HTTP Redirection record with the name ‘www’ under the domain ‘example.com’ and a URL of ‘http://www.dnsmadeeasy.com/support/’, a hard link would cause any request for ‘http://www.example.com/some/path/index.html’ to forward to ‘http://www.dnsmadeeasy.com/support/’ and not ‘http://www.dnsmadeeasy.com/support/some/path/index.html’. If Hard Link is unchecked, the same request would forward to ‘http://www.dnsmadeeasy.com/support/some/path/index.html’.
- Redirect Type: There are currently three options: Hidden Frame Masked, Standard 301, and Standard 302. Choosing the Hidden Frame Masked option under this field will cause the redirection to occur in a hidden iframe within the requesting user agent (for example, your client's web browser). For example, with Hidden Frame Masked set, an HTTP Redirection record with the name ‘www’ under the domain ‘example.com’ and a URL of ‘http://www.dnsmadeeasy.com/support/’ would cause the requesting user agent to continue displaying ‘http://www.example.com’ in the address bar even after redirection has occurred, as opposed to showing the URL that the requesting user agent was redirected to. Choosing the Standard 301 option under this field will cause the redirection to be done as an HTTP 301 Moved Permanently status. This informs the requesting user agent that this redirection is permanent (or long term). Choosing the Standard 302 option under this field will cause the redirection to be done as an HTTP 302 Moved Temporarily status. This informs the requesting user agent that this redirection should be considered temporary (or short term).
- Title: (optional) If set, the hidden iframe that is used in conjunction with the Hidden Frame Masked Redirect Type will have the HTML meta description data field set to the value of this field.
- Keywords: (optional) If set, the hidden iframe that is used in conjunction with the Hidden Frame Masked Redirect Type will have the HTML meta keywords data field set to the value of this field.
- TTL: The TTL (Time to Live) is the amount of time your record will stay in the cache on systems requesting your record (resolving name servers, browsers, etc.). The TTL is set in seconds, so 60 is one minute, 1800 equal to 30 minutes, etc..
Systems that have a static IP should usually have a TTL of 1800 or higher. Systems that have a dynamic IP should usually have a TTL of 1800 or less.
The lower the TTL the more often a client will need to query the name servers for your host’s (record’s) IP address this will result in higher query traffic for your domain name. Whereas a very high TTL can cause downtime when you need to switch your IPs quickly.
Best Practice Tip
If you plan on changing your IP you should set your TTL to a low value a few hours before you make the change. This way you won’t have any downtime during the change. Once your IP is changed you can always raise your TTL to a higher value again.