- Newest
- Most votes
- Most comments
When you want to use your root domain for both your website and Apple's Account Driven User Enrollment (ADUE) service, you can accomplish this by properly configuring your CloudFront distribution and Route 53 records.
For your scenario, you'll need to set up:
- A CloudFront distribution that can handle both your website content and the ADUE service endpoints
- Appropriate Route 53 alias records that point your root domain to this CloudFront distribution
To configure this:
- In Route 53, create an alias record for your root domain (without any prefix) that points to your CloudFront distribution:
- Leave the "Record name" field blank (for the root domain)
- Select "A - Routes traffic to an IPv4 address and some AWS resources" as the record type
- Turn on "Alias"
- Choose "Alias to CloudFront distribution" and select your distribution
- Choose the us-east-1 Region
- Set "Evaluate target health" to "No"
- Configure your CloudFront distribution to handle different paths appropriately:
- Set up behavior rules in your CloudFront distribution to route different URL paths to the appropriate origins (your website content vs. ADUE service endpoints)
- You can use path patterns in CloudFront to direct traffic to different origins based on the URL path
This approach allows you to use your root domain for both services without requiring a separate subdomain for MDM. The CloudFront distribution will act as the front door for all traffic, and then route requests to the appropriate backend service based on the URL path.
If you're experiencing issues with the "Login pages unavailable" error when using Cognito with a custom domain, ensure that you've properly set up the CloudFront distribution and that DNS propagation has completed. Sometimes it can take up to an hour for changes to fully propagate.
Sources
Cognito : After ading custom domain "View login page URL doesnt work" | AWS re:Post
Use an Amazon CloudFront distribution to serve a static website - Amazon Route 53
answered a year ago
Relevant content
asked 5 years ago
asked 2 years ago
asked 4 years ago

Would you be able to help me with the steps to configure cloudfront distribution to point it both website and mdm?
I tried this method too, but my website is not accessible with either 404 or 503 error.