Add a domain to your project
This page provides instructions on how to add a domain to your redirection.io project. Once you add a domain, you can use redirection.io to manage redirects and traffic for that domain. Follow the steps below to get started!
Add a new domain
In order to add a domain name to your redirection.io project, you will need access to the DNS management for this domain. You will have to publish two new DNS records. Provided you have this access, configuring a new domain to use with redirection.io should be a matter of minutes and will take 4 steps:
- tell us which domain name you want to configure
- configure the backend server address, if there is one
- configure the SSL behavior
- setup the required DNS record to route the traffic to your new redirection.io managed instance
Let's discover these steps 🙂
Access the managed instances page
Access the "Managed redirection instances" page by clicking on "Instances" in the manager's left menu.
Once you're on the "Instances" page, you'll see a button labeled "Add a domain" Click on it to start the domain adding wizard.
Fill the Domain Name
In the first step of the wizard, your will be able to enter the domain name you want to add to your redirection.io project.
The domain name must be a valid domain name (or subdomain) that you have access to manage DNS for.
Fill the domain only, without any scheme or extra character (for instance, write down example.com
or www.example.com
, but not http://example.com
nor example.com/index.html
nor *.example.com
).
If you need to configure both the root domain (eg. example.com
) and a subdomain (eg. www.example.com
), you will need to repeat this procedure.
Configure the Backend Server and Its Options
In the second step of the wizard, you'll be able to configure the address of the backend server that generates content for your website, if there is one.
If the domain that you are configuring is a blank, naked or old domains that does not serve any page, but is only used to perform redirections, then you can uncheck the option "This domain serves a real website" and go on to the next step.
In this case, the domain will either serve 404
errors or 3xx
responses, depending on the rules defined in your project. If none of the project rules match an incoming request for this domain, an error page will be displayed with a 404
status code.
If the domain that you are configuring is used to serve a real website (with pages, etc.), then you have to define the address of the backend server (the server which generates the content of the pages).
This backend address can be a valid IPv4 address or a hostname, it depends on the way your website is hosted. If the domain is already configured to serve the website, we will try to guess the right backend address configuration based on your current DNS configuration.
You can also set up options to manage the connection to the backend infrastructure:
- Connect to the backend using TLS: if this option is enabled, the connection to the backend server will be performed using TLS (Transport Layer Security), a protocol that provides secure communication. This ensures a private and unmodified connection between redirection.io and your origin server.
-
Allow invalid backend SSL certificates: this option can be checked if the content of the backend is served using an invalid SSL certificate (for example, a self-signed or an expired certificate). In other words, if this option is disabled and the backend serves responses with an invalid certificate, the user will get a
503 Service Unavailable
HTTP error, as we are unable to ensure that the provided response is valid.
Configure SSL options for your domain
In the third step of the wizard, you can choose to enable or disable SSL for your domain. We recommend enabling SSL for better security. You can choose to let redirection.io generate or renew a free SSL certificate for your domain using Let's Encrypt, or provide your own custom certificate.
Please note that we strongly advise against disabling SSL.
Also, you can let redirection.io generate or renew the SSL certificate automatically, for free, using the services of Let's Encrypt.
If you choose to provide a custom certificate, you'll need to copy/paste a PEM Certificate, Private key, and Intermediate certs. Please note that, in this case, you are responsible for monitoring your custom certificate's expiration date and updating it in time.
Change the DNS records for your domain
Prior to migrating your A
or CNAME
record, you may also want to set a low TTL (Time To Live) for the DNS records. The "TTL" specifies how long other DNS servers should cache the record before checking for update. Temporarily lowering the value to 300
or 600
some time before performing the switch will help the traffic to be more promptly routed to the redirection.io managed instance.
The final configuration step guides you in the configuration of your domain DNS records.
redirection.io needs that two records are changed or created:
- a
TXT
record, to associate the domain name with your redirection.io project - a
A
orCNAME
record, depending whether you are configuring an apex domain (eg.example.com
) or a subdomain (eg.www.example.com
).
If you have also configured a AAAA
record for your domain, please either remove it, or replace it with the value proposed in the manager.
We do not provide detailed instructions for each and every DNS service providers. However, the tasks to perform should usually always match these general instructions:
- Log in to your DNS provider's control panel and navigate to the DNS management section.
- Find the domain for which you want to add the DNS records and click on it.
- For the
A
or theCNAME
record:- Search if such a record already exists in the DNS zone. If your website was already configured to serve pages, there must by a previous
A
orCNAME
record that you need to edit. Else, you will have to create a new record of the requested type. - Enter the appropriated IP address or domain name, as instructed by redirection.io, in the record value or destination field.
- Search if such a record already exists in the DNS zone. If your website was already configured to serve pages, there must by a previous
- For the
TXT
record:- Look for an option to add a new record and choose
TXT
from the list of record types. - Enter the
TXT
record name requested by redirection.io. Note that some DNS providers require a final dot (".
") at the end of the domain name in the record. This is because the DNS system uses a hierarchical naming structure, and the dot indicates that the domain name is fully qualified. However, not all DNS providers require this, so check your provider's documentation to be sure. - Enter in the appropriate field the
TXT
value provided by redirection.io
- Look for an option to add a new record and choose
If you have configured the A
record for your apex domain to the IP address provided by redirection.io, please take care to remove the a
mechanism from any TXT
SPF record for this domain.
As this IP address will never send emails for your domain name, you must make sure, at the SPF level, that it is not authorized to do so.
Save the new records and wait for the changes to propagate through the DNS system. You can hit the "Re-check DNS" button to verify if the domain is properly configured. When it is the case, your website should work without any downtime.
If you have chosen to use automatic SSL certificates, there may be a short delay before the certificates are available. In the meantime, we will serve self-signed certificates, which means your users will get an alert in their browser, which is something that you may want to avoid. In this case, please first configure your domain with a custom SSL certificate, then switch to a "automatic SSL" later on, once your website has been migrated.
Start using redirection.io on your domain
That's it! Your domain is now added to your project and ready to use with redirection.io 🎉
👉 Next steps: check your traffic logs and create rules. For example, you may want to create a rule to redirect http://
requests to their https://
equivalent
APEX domains and subdomains redirects
When configuring an APEX domain (that is, a domain without any subdomain, eg. example.com
) on redirection.io, there are chances that you also want the very common www.
subdomain to work too.
In order to avoid duplicate content, you will usually want to redirect the root domain to the subdomain (or, the other way, redirect the subdomain to the apex domain).
- first, configure your apex domain name (
example.com
) using the procedure above - configure its backend address, etc. - then, configure the sub-domain (
www.example.com
) using the procedure above, but do not enable a backend. Instead, create a rule to redirect all the requests performed on the subdomain to the main domain:
Certificates renewal information
When "Automatic SSL" option is enabled, we take care of the SSL certificates management, and renew those sufficiently in advance to avoid any risk of interruption.
If you prefer to use your own certificate, we do not check for the certificate validity, and let you take care of the certificate / update it when required.
The project domains list
The list of the domains attached to the project is available using the "Instances" item in the left menu. All the configured domains are listed alphabetically, and provide a quick way to view the status of each domain.
If there is an issue in the domain configuration, you can easily spot it in the domains list:
At any moment, you can edit a domain config by hovering on its line to open the edition lateral panel.
Removing a domain from the project
If you remove a domain from your redirection.io project, or if you delete your project completely, you should take care to also edit the DNS records in order to:
- completely remove the verification
TXT
record; - change the value of the
A
or theCNAME
record. - remove the value of the optional
AAAA
record.
If you do not do so, your website / domain will stop working correctly, and will be served as a 404
error page.