Mailserver: using same domain but other hosting - azure

I have a question about setting up my mailserver settings. I have a website on azure, so in my DNS settings at my reseller, i set up tot point domain.com to domain.azurewebsites.net.
Website is working fine, so far so good. Now i want to use a mailserver, hosted somewhere else, because azure doesn't provide this out of the box.
In my DNS settings i set up the MX record to point to my other hosting where i have a mailserver defined.
domain.com MX mail.domain.com
mail.domain.com A "ipadress mailserver"
When i try to send a mail using my mailcredentials and mail.domain.com as smtp server, all works fine. But i can't receive email messages. Is it possible to set this up if my main domain will point to azure?

Seems like i found a solution. You should not use a CNAME for the root domain as this is also used to resolve the MX record. So just add an A record for domain.com instead of a CNAME and the MX record will be reslved properly. Off course, azure does not recommend an A record because the IP address can change, but this is only when you change plan or disable/enable your website.

Related

Created Two DNS in two different Provider

I am new in developed website. I have accidentally created a new DNS zone in Microsoft Azure which the domain already has its own DNS in another hosting company. The hosting company help to handle email of the domain.
Besides that, the company was also pointed the root domain to my web app by using A record.
The website now can be accessed via domain.com but not www.domain.com.
What is the solution for me to point www.domain.com to my web app domain.azurewebsites.net and without affect mail.domain.com?
What is the solution for me to point www.domain.com to my web app
domain.azurewebsites.net and without affect mail.domain.com?
We can add CNAME record to your web app service like this:
Host type value
www CNAME xxx.domain.azurewebsites.net
how about if I set cname * and point to domain.azurewebsites.net, will
it affect mail.domain.com?
If you set CNAME * and point to domain.azurewebsites.net, that will not affect mail.domain.com.
Because mail type is MX record, that will not affect CNAME record.
Hope this helps.

Adding subdomain on Namecheap for Shared IP SiteGround website

I have been figuring out how to accomplish this for a day now and read through a bunch of tutorials but could not make it work the way I wanted.
So my current set up is that I have a website that I registered the domain with Namecheap, let's call it mywebsite.com. The main app is hosted on Heroku, so both mywebsite.com and www.mywebsite.com is set up as URL redirect and CNAME to point to the heroku address. For example I have a CNAME record for www pointing to www.mywebsite.com.herokudns.com. This works fine and I would like to keep it that way.
I recently registered for a SiteGround service to set up my wordpress blog. I would like it to be accessible at blog.mywebsite.com. Most of the tutorial I have seen is to either migrate the domain to siteground so the wordpress site can point to the main domain or to point the namecheap DNS nameservers to the siteground one which I don't want to do neither because I do not want to redirect the traffic away from the heroku app.
I have tried to set up NSRecord according to Namecheap doc, I added the record for blog to point to ns1.siteground1111.com (the nameservers siteground provided) but when I entered blog.mywebsite.com it said server not found. I am on a SiteGround shared IP plan and I can see the blog if I visit ns1.siteground205.com/~myusername. However creating A record or CNAME requires bare IP and domain so I wonder if that's the issue.
My question is if my approach was correct in trying to set up the subdomain by creating a NSRecord on Namecheap pointing to SiteGround's nameservers. Or is it necessary for me to pay extra and get a dedicated IP address from SiteGround for me to point my A record for blog to.
Alternatively, I also have extra domains I am not using and I could set SiteGround blog to those domains and perhaps create a CNAME record for blog.mywebsite.com to www.myotherwebsite.com? That sounds like an overcomplication of the issue but I am not sure what to try at this point.
Really appreciate any help!
In Namecheap admin for your domain name mywebsite.com:
(1) Create an A record:
[type, host, value, TTL]
A, #, 1.2.3.4, 1min
where 1.2.3.4 is the Siteground IP address of your account.
(2) Create another A record:
A, blog, 1.2.3.4, Automatic

How can I create an mx record with openshift?

Openshift domain (example.com) requires a CNAME pointing to my example.rhcloud.com. However by doing this, and not allowing us to do an A record with IP they are breaking the ability to do an MX record for example.com since an MX record requires that example.com be an A name not a CNAME.
Is there a way around this? I'm using namecheap.
I've seen some hacky stuff to point to www.example.com but I don't want to do that, as I want to remove the www. from the domain.
Its not possible with openshift, because example.com needs to point to an A record for mx.example.com to work properly. Its required by the RFC spec.
Because openshift requires you point example.com to a CNAME (foo-whatever.rhcloud.com), you cannot then point mx.example.com to an IP of email server and expect mail for me#example.com to work.
There are some hacky solutions, like using 3rd party dns resolver and cronjob to update the IP address of the openshift server, but none of these seem like solid solutions to me.
https://www.openshift.com/forums/openshift/methoddynamic-ip-for-your-apps-a-record
OpenShift Online is not a dns provider, you can not create an mx record using it. You would need to create an MX records at your dns provider for your domain.
If you mean "how can i create an mx record using my dns provider along with having a cname for openshift", then you would need to create an mx record that points to your third party mail service.
You can check out this answer (https://serverfault.com/questions/100064/dns-is-it-valid-to-have-an-mx-record-and-no-a-record) which should help you.
Some DNS providers support special types of DNS records that dynamically look up dynamic IP adresses and create the corresponding A records.
DNSimple calls this an ALIAS record.
DNS Made Easy calls it an ANAME record.
You can use these special record types instead of CNAME, if your DNS provider supports them.

How to add a subdomain on GoDaddy on Azure site

Lest say I have a web application called example.com
everything is ok with it and both www.example.com and example.com redirect to the correct A record "#" defined on the GoDaddy Zone file.
The thing is, that my back office web application is on a different Azure server than the main site (site is on example.com and the back office needs to be on office.example.com).
for that i have created another server on Azure.
example.com is on example.azurewebsites.net
office.example.com is on example-office.azurewebsites.net
(azure management site shows that both server have the same ip)
(Btw, is that what I should have done?)
What I tried was:
1. add "office" A Record on Goddady that redirects the same ip (in addition to #) - didnt work.
2. add "office" CNAME that redirects to example-office.azurewebsites.net - didnt work
In both cases i added the awverify and the awverify.www as followed:
awverify.office is awverify.example-office.azurewebsites.com
awverify.www.office is awverify.www.example-office.azurewebsites.com
Azure Manage Domains doesnt recognize office.example.com
What should I do at GoDaddy's to make it work?
Thanks
you can find solution (godaddy screenshots included) here
https://azure.microsoft.com/en-us/documentation/articles/web-sites-godaddy-custom-domain-name/
CNAME or A records pointing to IP or domain is right solution
adding awverify is needed only if using A record
better solution is to use CNAME - after stopping web service and starting again, you will receive probably different IP addres in azure (or you can use traffic manager)

Hosting root domain (mydomain.com) with Windows Azure Shared Website?

I've been working on trying to get my own domain, for example mydomain.com, hosted in Azure Websites.
I upgraded/scaled to change my setting to "Shared".
I added CNAME record from www.mydomain.com to mydomain.azurewebsites.net.
I added www.mydomain.com to my website in azure under "Manage Domains", and it allowed me to add it successfully.
I am able to browse successfully to the website with www.mydomain.com.
I changed the A record for mydomain.com to point to the IP address listed under the Manage Domains section of the Azure website.
The CNAME and A record have propagated based on testing on my machine and on centralops.net DNS lookup tools.
If I browse to mydomain.com I get a 404. www.mydomain.com works as expected.
Can anyone help?
Step by step. This is working for me.
1 - In your DNS registrar create a CNAME record like following.
Name = awverify.mydomain.com
Value = awverify.mydomain.azurewebsites.net
TTL = 86400
2 - In Azure panel, add mydomain.com to your custom domains. It should show green check.
3 - Go back to your DNS registrar's web site and add an A Record for your custom domain using to IP provided to you by Microsoft in Azure Portal.
Name = mydomain.com
Value = 64.49.121.33
TTL = 7200
More info here.
I can think two options:
a) The Azure web server needs to be configured to browse your site with both www.mydomain.com and mydomain.com. Maybe you have configured only one in "Manage Domains"
b) mydomain.azurewebsites.net. resolves to a different IP than mydomain.com (the A Record you added in mydomain.com is wrong)
you need to work with a DNS provider that allows you to forward the A record to a DNS (Go Daddy provides this option) - i.e. www.mydomain.com points to mydomain.azurewebsites.net and mydomain.com is forwarded to www.mydomain.com

Resources