Before you begin
You need:- A project that’s ready to go live
- A domain with access to its settings with the registrar
- A registrar that allows
CNAMErecords or one of the alternatives on apex domains - Optional: The CLI installed locally
1. Get the target for your project
You want to point your DNS record to the automatically generated URL. Your domain needs to point to that target for your site to go live.- Using the CLI
- In the Console
Get the target by running the following CLI command:
2. Configure your DNS provider
Your DNS provider (usually your registrar) is where you manage your domain. Most registrars offer similar functionalities regarding DNS configuration but use different terminology or configuration. For example, some registrars require you to use an@ to create custom records on the apex domain, while others don’t.
Check your registrar’s documentation.
Note that depending on your registrar and the time to live (TTL) you set,
it can take anywhere from 15 minutes to 72 hours for DNS changes to be taken into account.
- Not using a CDN
- Using a CDN
To configure your domain name to point to your project:
- Consult your provider’s documentation to find out how to add or edit DNS records.
- Open your registrar’s domain management system.
- Set the TTL on your domain to the lowest possible value to minimize transition time.
- Add a
CNAMErecord pointing from your domain to the target. Not all registrars allow these kinds of records. If yours doesn’t, see the alternatives. - Optional: If you have multiple domains you want to be served by the same app, add a
CNAMErecord for each of them. That includes thewwwsubdomain if you are using it in your routes configuration. - Set the TTL value back to its previous value.
example.com and you are using the www subdomain, you have records like the following:example.comis aCNAME/ANAME/ALIASrecord pointing tomain-abcd123.abcdefgh1234567.eu.platformsh.site.www.example.comis aCNAMErecord pointing tomain-abcd123.abcdefgh1234567.eu.platformsh.site.
example.com and www.example.com point to the same target.
Redirects are handled by the router you configure.3. Set your domain
Add a single domain to your project:- Using the CLI
- In the Console
Run the following command: