aws email server setup same domain - amazon-web-services

1.I have a domain name in namecheap.com.
2.I have servers, including a web server, and an email server on amazon.
3.My web server and email server have 2 different IPs.
4.But I only have one domain, lets say www.abcde.com.
5.I was able to setup the NS, and the "A" correctly in away that www.abcde.com points to my web server.
When visitors go to url www.abcde.com I want them to go to the web server.
How do I setup an email server so that email that goes to admin#abcde.com points to the email server?

You need to add an 'MX' DNS record pointing at a CNAME record which points the mail server's IP. Also, it needs a number indicating the 'preferred' server. If you only have one, then this number doesn't matter.
So, you want an MX record like:
MX mail.example.com 10
And a CNAME record like:
CNAME mail.example.com which points to x.x.x.x

Related

Redirect a AWS static IP to domain

I have deployed a django based website on my AWS lightsail instance. the web address has a port 8000 (:8000). I own a domain on (host =fatcow.com). I have created a hosted zone on AWS and pasted the ns values to my provider(factor)'s Nameservers values. In the amazon route53, I have created a new record with a simple redirect A ipv4 and entered the resolver IP address value - my web address with port value. it doesn't work.
Also, I have read that the redirect will not work for its with port numbers. I have tried redirecting my domain to the static ip, then created another hosted zone record trying to redirect the static ip to the ip+port value - error pops up saying it is not a valid address.
I currently use the development server provided by django as it is a personal website and currently it will not have a lot of traffic - portfolio website.
Also, on my fatcow.com domain settings, the Nameservers are updated and in the whois values, new Nameservers are seen. I have only added the 4 NS values. AWS also created SOA ip values but I was not able to add them to the domain (Inputs were not taken by fatcow ).
In the NSLookup website, I can see NS values and SOA values which are on the AWS hosted zone but A records show none.
Edit: sorry for the confusion. my domain is www.chandradhar.com. I'm not a web dev but I'm trying to deploy a django based portfolio website. I have added Amazon Lightsail DNS nameservers to my domain (host=fatcow.com). the web address is :8000 port. Without the port number, the website isn't loading at all. Only with the port number along the static IP, the website loads. 'A' record isn't taking the port number. I did add a SRV record with the port number(in AWS route 53) but still doesn't work. when checked from the website nslookup.io, the nameservers are updated correctly
Not reproduceable.
> host fatcow.com
fatcow.com has address 65.254.254.33
fatcow.com mail is handled by 10 mail.fatcow.com.
Most probably your changes in DNS have already propagated.
Steps to successfully deploy one or more websites on lightsail AWS when the domain is on another website like godaddy/fatcow.
Create a dns zone in the networking section of the lightsail instance.
Copy the name servers from the dns zone and paste it in the name servers section of the domain provider (fatcow/godaddy) - it might take upto a day for the values to get updated - i used nslookup.io to see if my nameservers were updated.
Create 'A' records and SRV records pointing to the static ip of the lightsail instance.
Install Nginx
Create a simple script with the (name of the website).conf in the conf.d folder/available sites folder
Add the following script:
server
{
listen 80;
server_name domainname.com;
location / { proxy_pass http://ipAdd:PortNum;
}
}
Repeat the same code block with different domains and redirect ports. I guess we can also use 301 redirect to achieve the same.
This might or might not be the proper way of achieving what I required but it'll work.

cpanel hosting emails not working with AWS DNS servers name

info: i have two hosting server one is on skyhost.com and the other is on AWS Lightsail. skyhost is a cpanel hosting where i register my domain name and my emails accounts. My website is hosted on AWS Lightsail with the domain. my website is contain the domain which is register on skyhost. The website is working fine because AWS DNS are propagated with domain which is register on skyhost.
Issue: But the email info#mycompany.com are not working (sending or receiving). I am not able to login the accounts since i host my website on AWS because i don't understand how can i add DNS records in Lightsail AWS of skyhost for mail exchange or something else...
example: (65.91.30.99) that is the ip of cpnel skyhost. staticip-1 that is a AWS server ip
To keep it simple, the MX records do not point to IPs.
You will need to set the sub-domain to the naked domain example.com or "#" in some cases. (I have not used the light sail DNS console before)
But you then set up the "Maps to" as mail.example.com and then create an A record for mail.example.com to point to 65.91.30.99
This is how basic DNS routing works for email.
More info here: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-create-dns-entry

SPF record definition within Route 53

I've got an application that is hosted on aws, but mail is sent via google. I'm using Route 53 for my DNS. I'm trying to figure out what to use for an SPF record within Route 53 to enhance the deliverability of my emails.
Within the SPF record, I understand that I need to specify the mail server in either domain, ip4, or ip6 format.
Within the SPF record, would I use the ip address of my load balancer on aws or would I specify my domain name? Alternatively, should I indicate a domain name or IP address that represents GSUITE's servers?
I'm very confused. Thanks for your help!!
You need to follow this guide which gives you the SPF record to use for your Google email service. Since your load balancer and AWS servers are not involved in your email service, they would not be included in the SPF record.

how to redirect DNS to a domain and emails

I have a domain that registered on company that just provide just domains, I made workspace google emails on that domain, and i have web host in small company.
I want buy web hosting on HostGator and redirect the domain and google emails there.
I know how to redirect domain to the HostGator DNS, but for the emails I don't know how
how can redirect the emails, will the emails stop working and for how long?
Thank you
Domain names (website etc) work with A and CNAME records.
Emails work with MX records.
So, if your google MX records are set and working, all you need is to add A / CNAME records to get the website to work.
This will not cause any downtime at all.
You need to set MX records of your Google Mail server at your DNS zone. Because mail server uses MX records.
Thank you,
Harsh Sheth

Can I use Amazon's DNS servers for my mail server

We have a domain mydomain.com, which we have registered with a UK registrar. We are using Amazon's Route53, and this domain has been added in Route53 and is using the name servers as follows;
ns-558.awsdns-05.net
ns-1755.awsdns-27.co.uk
ns-466.awsdns-58.com
ns-1343.awsdns-39.org
I've added the relevant A records for www etc to point our elastic IP to this domain.
We are also running MailEnable on this EC2 server (running Windows 2012). The MailEnable server is asking for me to enter DNS addresses (Check and configure DNS settings), I assume it will use when sending email.
My question is what DNS addresses / servers can I use ? Can I use
ns-558.awsdns-05.net
ns-1755.awsdns-27.co.uk
ns-466.awsdns-58.com
ns-1343.awsdns-39.org
You can see the DNS address(es) in the screen shot below.
You can't use those Amazon servers because they're authoritative-only (they'll only tell you about domains they know about, instead of acting as a recursive proxy). You can use Google's public DNS servers at 8.8.8.8 and 8.8.4.4 for that field.
(original answer below)
You need to create an A record that points at the elastic IP assigned to your mail server (for example, mail.yoursite.com points at 1.2.3.4). Then, you'd create an MX record for yoursite.com that points at mail.yoursite.com. Finally, I believe you would give MailEnable mail.yoursite.com, but I'm not 100% sure on that.