Using API Gateway with a custom domain from a third-party registrar


I am creating an API Gateway and I would like to use it with a custom domain. This domain is registered with a third-party provider, not Route 53. I have successfully obtained the ACM Certificate and I have added a DNS CNAME record to my registrar pointing to the API Gateway subdomain (<id>.execute-api.<region> However, the API is not working. Any guidance for solving this would be greatly appreciated. Thanks!Configuration in API Gateway console

1 Answer

Create a custom domain in API Gateway: a. Navigate to API Gateway in the AWS Management Console. b. Click "Custom domain names" in the left menu. c. Click "Create" and enter your custom domain name. d. Select the ACM certificate that you've obtained for your domain. e. Click "Create domain name".

Configure the custom domain's base path mappings: a. Under the "API mappings" tab in your custom domain settings, click "Configure API mappings". b. Click "Add new mapping". c. Select your API, stage, and (optionally) set a base path prefix. d. Click "Save".

Update the DNS record at your domain registrar: After you've created the custom domain, you should see a "Target Domain Name" or "API Gateway domain name" in the custom domain details page. This is the value you need to set as the CNAME target in your domain registrar's DNS settings. The value should look like <id>

Configure your domain registrar to use the API Gateway custom domain: a. Log in to your domain registrar's control panel. b. Find the DNS settings for your domain. c. Add a new CNAME record pointing your custom domain to the API Gateway target domain name (<id> Make sure to remove any existing CNAME records pointing to <id>.execute-api.<region>

Wait for DNS propagation: DNS changes may take some time to propagate, usually around a few minutes to a few hours. You can use a tool like nslookup, dig, or an online service to verify that the CNAME record has propagated correctly.

if the error still exists check the ACM certificate covers the correct domain and is issued in the us-east-1 (N. Virginia) region

profile picture
answered a year ago
  • Thank you for your reply. I have tried following the steps you suggested. It seems like the problem might be related to the connection between the API Gateway domain name and the DNS CNAME record. (See screenshot in the original post of configuration in the API Gateway console.) For some reason, the value that I need to set as the CNAME target which you mentioned still looks like "" and I do not see a "" domain. I am using a Regional endpoint type, which I gather might differ technically to the Edge-optimized APIs. Might you have any suggestions about this CloudFront link part? Thank you!

  • @Sedat Salman, I have the same same scenario mentioned in the question, along with the SSL is also configured in the third party vendor. I have followed the steps you have mentioned in the answer. Also created SSL in ACM for the domain and a wildcard entry. There is no CloudFront for the APIs. Rest I have done the same but my APIs are not working. What else I need to do to get this working? Thanks !

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions