'AWS Amplify custom domain giving 403 access denied Error
I have hosted my react app in AWS, for the domain I used the bluehost DNS. I can add the domain using 'www' CNAME into the record of bluhost DNS. but the problem is there. I can not use www in this case. I added a subdomain, the subdomain works. But I was unable to load the app with the original domain. The original domain shows 403 forbidden error.
Solution 1:[1]
Considering that you want to use AWS Amplify hosting I think the best solution is to keep it within Amplify: Create a AWS Route 53 for your domain, take the NS records and add them to Bluehost DNS like this: custom-nameservers
You can now use the AWS Amplify console to add your Amplify hosted website to Route 53, which handles your domain. Everything is done by Amplify Hosting.
Solution 2:[2]
I also had a 403 error when accessing through a custom domain name, which has been resolved.
The problem I'm having is: custom root domain (example: docs.a.com) is not enabled on the branch.
Solution steps:
Suppose the branch name is "main",
- Confirm that the domain name provided by amplify (similar to: https://main.xxx.amplifyapp.com) can be accessed normally
- Go to the DNS provider to confirm that the DNS record is: CNAME, docs, main.xxx.amplifyapp.com
- Go to Amplify Console -> Domain management -> Manage subdomains, to set the root domain (docs.a.com). Select the "main" branch, and click Enable. Then click the Update button and wait for Available.
The correct result is shown in the figures: 1)Edit root domain 2)Domain management
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | bbebin |
| Solution 2 | nodewee |
