- Newest
- Most votes
- Most comments
can you verify in Amplify Console → Hosting → Custom domains that:
- Both derbyware.com and nidam.derbyware.com are listed
- Their status shows as "Available"
- SSL certificates are properly provisioned
Also change the redirect rule
[
{
"source": "https://derbyware.com",
"status": "301",
"target": "https://nidam.derbyware.com"
},
{
"source": "https://www.derbyware.com",
"status": "301",
"target": "https://nidam.derbyware.com"
},
{
"source": "/<*>",
"status": "404-200",
"target": "/index.html"
}
]
301 is for Permanent Redirect
answered 10 months ago
Based on your issue, there are a few things to check to get your root domain redirection working properly in AWS Amplify:
-
First, make sure both your root domain (derbyware.com) and subdomain (nidam.derbyware.com) are added in the Amplify domain management. This is a common oversight - you need to include both domains in Amplify's domain settings for the redirection to work properly.
-
For the redirect configuration, your rule looks close but might need adjustment. Try this format instead:
{
"source": "/",
"status": "302",
"target": "https://nidam.derbyware.com"
}
- In your Route 53 configuration, ensure you have:
- A CNAME record for "nidam.derbyware.com" pointing to your Amplify app
- An A record alias for "derbyware.com" pointing to your Amplify app
-
The error message about "AWSAmplifyDomainRole" could be related to permissions issues. This role is used by Amplify for domain management. You might need to recreate this role or check IAM permissions.
-
In the Amplify console under domain settings, make sure you've selected the option "Setup redirect from https://derbyware.com to https://nidam.derbyware.com".
If the issue persists after these changes, try removing both domains from Amplify and adding them again, making sure to include both the root domain and subdomain in the process.
Sources
Root domain redirection is not working on AWS Amplify with a custom domain. | AWS re:Post
I getting the 301 issue while deploy my code in the aws amplify | AWS re:Post
Custom domain for Amplify not working | AWS re:Post
Route53 redirect HTTPS from A to CNAME | AWS re:Post
answered 10 months ago
- they are both added.
- tried the redirect configuration, it does not work.
- in route 53: Record name derbyware.com Record type A Value *******.cloudfront.net. Alias Yes and it says Route traffic to : Alias to CloudFront distribution and Record name nidam.derbyware.com Record type CNAME Value *********.cloudfront.net Alias No and Record type : CNAME - Routes traffic to another domain name and to some AWS resources
- that's not helpful, I don't know what that means.
- "Setup redirect from https://derbyware.com to https://nidam.derbyware.com"" there is no such option.
Can you try this redirect URL.
[
{
"source": "https://derbyware.com/<*>",
"target": "https://nidam.derbyware.com/<*>",
"status": "301"
}
]
it also doe not work, I think it is a bug in amplify, especially since I get this "The role with name AWSAmplifyDomainRole-Z32DQIOI2NLNAJ cannot be found." when visiting the custom domain page
Relevant content
asked a year ago

yes they are listed and available see picture https://imgur.com/a/lKig1ls added your redirect rule it still does not work
your setup looks good. DNS propagation can take up to 48 hours (usually much faster). CloudFront distribution updates take 15-30 minutes. You can check propagation status using tools like nslookup or online DNS checkers.