Set Up a Custom Domain
Change the URL of your API hub to your domain.
Must be enabled
This feature may need to be enabled on your Enterprise Hub. Please contact your Rapid representative to enable it.
Prepare to set up a custom domain
Setting up a Custom Domain for your API Hub is a technical task, and will require a few things:
- A basic understanding of DNS Records.
- A custom domain that you own.
- The ability to add/edit records to your domain.
Picking a custom domain
Let's say you run a Weather product specifically for squid, and have the domain squidweather.com
. You decide that you want to host your API Hub at hub.squidweather.com
.
Subdomains only
You can't host your API Hub at the "root" of a domain.
squidweather.com
isn't a valid option for an API Hub Custom Domain. You must host your API at something like[subdomain].squidweather.com
.
Make sure that you have login credentials for your Domain Registrar or DNS provider, then follow along to get your custom domain set up!
Beginning the set up
- Navigate to the Admin Panel.
- On the sidebar, click Settings.
- Click the Custom Domain tab near the top.
- Enter the domain you want to use for your API Hub.
- This is
hub.squidweather.com
, not your "main" domainsquidweather.com
.
- This is
- Click Begin set up.
Creating ownership DNS records
The next screen will show you two DNS TXT records and their values that we'll check to make sure you own the domain name and give us permission to serve SSL certificates for it.
_acme-challenge.hub.squidweather.com
_cf-custom-hostname.hub.squidweather.com
Log in to where your DNS records are managed. This is usually your Domain Registrar (Godaddy, Namecheap, MarkMonitor, etc.) or a DNS Provider (DNSimple, NS1, Route53, etc).
Your DNS Zone manages all of squidweather.com
, so you're going to add the following two records:
Type | Record | Value |
---|---|---|
TXT | _acme-challenge.hub | tTrm53ud3... |
TXT | _cf-custom-hostname.hub | c9aba1a7-... |
Check your record
Every DNS Provider and DNS Zone is different. We give you the entire record that Rapid will verify. If you create a record for all of the text that you copied, you might create a record like
_acme-challenge.hub.squidweather.com.squidweather.com
. That won't work. Generally, you'll remove the "root domain" from the record we give you.
Verifying the records
Because of the way DNS works, it can take a while before it's possible to verify that you've created the DNS records correctly. Until then, you'll see a "Pending" status next to the records. When we've successfully checked them, that status will change to "Active".
This process normally only takes a few minutes, and rarely takes more than an hour if you've created the records correctly, soon after starting the Custom Domain creation flow.
It's extremely unlikely to take longer than 24h. If that happens, start over, or contact support.
There's only one step left when your DNS Verification records are "Active"!
Setting up your CNAME record
This is the record that points hub.squidweather.com
at your shiny new API hub!
Go back to your DNS record management and add the following record
Type | Record | Value |
---|---|---|
CNAME | hub | hub-us.rapidapi.io |
Once you've created that record, click "Enable custom domain" in the Admin Panel. It'll do a check to verify the record's been created (which can take a few moments, just like the other records). Once it verifies the CNAME record is created, everything will be enabled!
๐ Your API Hub is now running on your custom domain, congrats!
Updated 10 months ago