0

Do I need to set up my listener to redirect to www.mypage.com? How do I accomplish this?

Current issue: when I try to load mypage.com nothing happens, just times out.

update: I set up certificate for *.mypage.com

2 Answers 2

1

Make sure you get certificate for mypage.com not just *.mypage.com. Also make sure to set up your listener to route from naked domain to www.mypage.com. This should work

1

You should already have something like this pointing to the server or load balancer:

MYDOMAIN.com.   A   42.42.42.120

Add a CNAME record that points to the domain name not to the IP address or load balancer. That is, to the left side of the A record not to the right side.

www.MYDOMAIN.com.   CNAME   MYDOMAIN.com.

Add additional A records as needed (AWS might have done this for you already)

ipv4.MYDOMAIN.com.  A   42.42.42.120

These could be either A or CNAME, using an A record skips the second DNS lookup

ftp.MYDOMAIN.com.   CNAME   MYDOMAIN.com.
webmail.MYDOMAIN.com.   A   42.42.42.120
mail.MYDOMAIN.com.  A   42.42.42.120

For POP/IMAP incoming mail

MYDOMAIN.com.   MX (10) mail.MYDOMAIN.com.
5
  • I have an A record with alias turned on. The name is "mypage.com" and the alias points to the load balancer. Is this part correct? In addition do I create a cname record?
    – rio
    Commented Apr 5, 2019 at 19:18
  • If you already have an A for mypage.com then you would not add a second one, just add the CNAME
    – Dave S
    Commented Apr 5, 2019 at 19:21
  • yes, edited to be clearer. You can leave out the ftp, webmail, etc. if you don't need them.
    – Dave S
    Commented Apr 5, 2019 at 19:23
  • ok let me clarify what I have so far: A name record, "mypage.com" alias --> pointing to elb. CNAME record, "www.mypage.com" no alias ---> pasted ELB dns value. Both saved now. Do I need to tweak the listeners in elb? Because when I go to mypage.com it doesn't redirect to mypage.com . EDIT: in my ELB listeners I have https 443 setup and that has forward to my target group set up(which in turn points to my instance). Then I have http as well in listeners which points to my https 443 and redirect to my "original path/query"
    – rio
    Commented Apr 5, 2019 at 19:26
  • CNAME points to mydomain.com not to the IP address or load balancer. that is to the left side of the A recond not the right side.
    – Dave S
    Commented Apr 5, 2019 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.