Must use www for DNS entry using Amazon Route53

前端 未结 8 1341
予麋鹿
予麋鹿 2021-02-04 03:39

I administered my domain e.g www.abcd.com in Amazon Route53. Everything works perfectly, except that when user type abcd.com without www, it won\'t get resolved. Any idea? Thank

相关标签:
8条回答
  • 2021-02-04 03:47

    I think this might work:

    Select an IPv4address and select the "Alias" radio button.

    Leave the name field blank to indicate domain.com

    Then the target is www.domain.com

    I'll give it a try and let you know.

    0 讨论(0)
  • 2021-02-04 03:48

    Route 53 doesn't allow naked domain redirection. There are some tricky ways around it though.

    More:

    https://forums.aws.amazon.com/thread.jspa?threadID=55995#

    0 讨论(0)
  • 2021-02-04 03:51

    For Goddady domain migrated to AWS, I took the basic configuration for domain.com and modified it a bit.

    Search for somethin like this in your record set:

    Name: domain.com (or www.domain.com)
    Type: A - IPv4 address
    Alias: No
    Value: a_random_ip_address
    

    I just added a new record set with:

    Name: www.domain.com (or domain.com)
    Type: A - IPv4 address
    Alias: No
    Value: a_random_ip_address
    

    Remember afterwards to add www to your server (nginx, apache, etc)

    0 讨论(0)
  • 2021-02-04 03:59

    Here is the solution that worked for me.

    1. Name: www.domain.com
    2. Type: A - IPv4 Address
    3. Alias: Yes
    4. Alias Target: Select the value from the drop-down list that you have for domain.com
    5. Leave other settings and press Save Record Set

    By the way Amazon does not charge for Alias queries. More information here.

    Amazon Route 53 doesn't charge for alias queries to CloudFront distributions, ELB load balancers, or Amazon S3 buckets.

    0 讨论(0)
  • 2021-02-04 04:01

    The name abcd.com has to have its own resource records to be resolved other than those of www.abcd.com.

    0 讨论(0)
  • 2021-02-04 04:04

    To have your domain.com (without www) on Amazon Route53 you need:

    • Go to your record sets;
    • Create a Record Set, type A - IPv4 Address;
    • Put your domain.com or www.domain.com on value and save.

    On my case I create a new record set for www.domain too, but with type CNAME and put my ec2 domain.

    [edit] Print of my current configuration: enter image description here

    [update] If not work for you then you need to check your apache configuration. Check the ServerName and ServerAlias to allow *.yoursite.com or just www.yoursite.com. Don't forget restart your apache after changes.

    0 讨论(0)
提交回复
热议问题