Namecheap
Prerequisites
- Sign up for a domain on Namecheap
- Deploy an app with Architect and make note of the
stagingandproductionURLs - Make sure your app is deployed to
us-east-1 - Ensure the
@appname is uniquely named after the domain.
Step 1: setup SSL certificates with AWS Certificate Manager
In this step we will request a certificate from Amazon for our domain.
- Open up AWS Certificate Manager in the AWS Console in
us-east-1(region is required!) - Click
Request a certificateand thenRequest a public certificate - Ensure
example.comand*.example.comfor sub domains to work - Choose
DNS validationand clickNext - Add any tags and confirm the request
- Open up Namecheap account dashboard and click
Managefor the particular domain you want to use. - Open the
Advanced DNStab. - Click
ADD A NEW RECORD - Create CNAME records of both issued certificates
- Wait until they change from
pendingtosuccess
Step 2: setup CloudFront
Generate a CloudFront distribution with the certificate from step 1.
- Sign into AWS CloudFront in the AWS Console
- Click
Create Distributionand then clickGet Started - Open API Gateway and make note of the
Invoke URL. - Enter the URL from API Gateway in
Origin Domain Name - Set
Origin Protocol PolicytoMatch Viewer - Add the
Alternate Domain Names (CNAMEs)that you will be using. ex.example.com. - Set
Viewer Protocol PolicytoRedirect HTTP to HTTPS - Set
Allowed HTTP MethodstoGET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE - Set
Compress Objects AutomaticallytoYes - Set
SSL CertificatetoCustom SSL Certificateand select the cert from step 1 - Click
Create Distribution - Repeat for
stagingdomain.
Step 3: configure the domain Alias in Namecheap
Add Alias and CNAME records to DNS.
- Open up Namecheap account dashboard and click
Managefor the particular domain you want to use. - Open the
Advanced DNStab. - Click
ADD A NEW RECORD - Use record type
Aliasfor the root domain.- Add
@in theHostinput and add the CloudFront domain that was created in step 2 to theValueinput.
- Add
- Use record type
CNAMEfor thestagingdomain.- Add the word
stagingto theHostinput and add the CloudFront domain that was created in step 2 to theValueinput.
- Add the word
Conclusion
Now we’re done! You can check to see if your domains are online with the DNS checker tool DNS Checker tool.