Managing Elastic Beanstalk Domain Names: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 14: | Line 14: | ||
* Go to the [https://console.aws.amazon.com/route53/home AWS Route 53 management console] > '''Hosted Zones''' | * Go to the [https://console.aws.amazon.com/route53/home AWS Route 53 management console] > '''Hosted Zones''' | ||
* '''Create Hosted Zone''' button | * '''Create Hosted Zone''' button | ||
** | ** '''Domain name:''' ''domain name including subdomain'' | ||
** '''Type:''' Public Hosted Zone | |||
* After saving the hosted zone, click on it to open up its properties. | * After saving the hosted zone, click on it to open up its properties. | ||
** Click '''Create Record Set'' button | ** Click '''Create Record Set'' button | ||
** | ** '''Name:''' ''subdomain, e.g. `www`'' | ||
** '''Alias:''' Yes | ** '''Alias:''' Yes | ||
** '''Alias Target:''' Select an Elastic Beanstalk environment from the dropdown. | ** '''Alias Target:''' Select an Elastic Beanstalk environment from the dropdown. | ||
** '''Routing Policy:''' Simple | |||
== Configuring non-Amazon registrars == | == Configuring non-Amazon registrars == | ||
Revision as of 21:12, 20 July 2018
Overview
The documentation at Your Elastic Beanstalk Environment's Domain Name (AWS Elastic Beanstalk Developer Guide) is straight forward and easy to follow.
Configuring Django
Add the allowed domain names to the ALLOWED_HOSTS list in main_app/settings.py.
Make sure to prepend all domain names with a dot (.). Otherwise requests to subdomains such as www. will result in a 400 error.
Configuring Amazon Route 53
- Go to the AWS Route 53 management console > Hosted Zones
- Create Hosted Zone button
- Domain name: domain name including subdomain
- Type: Public Hosted Zone
- After saving the hosted zone, click on it to open up its properties.
- Click 'Create Record Set button
- Name: subdomain, e.g.
www - Alias: Yes
- Alias Target: Select an Elastic Beanstalk environment from the dropdown.
- Routing Policy: Simple
Configuring non-Amazon registrars
- In Amazon Route 53, navigate to the hosted zone's record sets.
- Find a list of name servers in the right column of the record with Type of "NS" ,
- Copy those name servers to the name server setting of the domain name with the 3rd-party registrar.
What should happen at this point is that any requests for the domain name that the registrar receives will be automatically forwarded to Amazon's name servers, which will then follow the rules defined by the hosted zones in Route 53.
Namecheap settings
- Log in at namecheap.com.
- Go to Dashboard > Domain List > find the domain > Manage button > Domain tab
- Under Nameservers select
Custom- Enter nameserver addresses listed with the Amazon Route 53 hosted zone.
- Click the checkmark to save the changes.