How to Host Email Only on Server?
-
I just realized I can't create an email account with the domain I wanted because cPanel is not offering it in the create email interface. I need to add it as an addon or parked domain first which is what I want to avoid. Is there any other way? 0 -
Thank you. To clarify about parked domains: - You can only park a domain on the main and not on the addon domain.
- When you park a domain you're effectively hosting its DNS on your server (cPanel creates a zone for it).
- SSL management is also performed on your server.
0 -
But if you can't have MX without mail.domain.com A record, how come I can host my email at Google Workspace just by adding their MX records without adding their A records for the mail.domain.com? 0 -
I think cPRex's reply was not very clear... usually MX record is like: domain.com. 14400 MX 0 domain.com. However if domain.com points to another server, you must have some other hostname pointing to your server, and that's why you need that mail.domain.com (or whatever.domain.com if you prefer). MX record can't be an IP address. 0 -
^That. You have to get the domain on the cPanel machine somehow, whether it's a park or addon. You may never us it for anything other than email, and that's fine too, but it has to get created. 0 -
Theorizing about this always confuses me. Is this the procedure: - I should park the domain on my server.
- This will effectively create a DNS zone (host DNS) on my server.
- I should change NS and MX records at the domain registrar.
- I can then create mailboxes.
- When you park a domain what is the difference from an addon domain? It probably doesn't have a folder/files of its own since it shares the root with the main domain.
- Can you park a domain on top of an addon domain like you can on top of the main domain?
- Is the parked domain redirected to its parent domain and what type of redirect is it, 301, 302, etc?
0 -
You are complicating things. When you park a domain in cPanel it will create dns records for it. But those records are used only if the nameservers of that parked domain are pointing to the cPanel server. You can have dns hosted in the registrar, but those records are used only if you use registrars nameserver. You my have dns records for a domain in several places, but the nameservers of the domain tell what dns records the domain is actually using. 0 -
So let's say DNS is hosted at the registrar and I park the domain at cPanel. Can I use cPanel's MX on the registrar to host email on cPanel? 0 -
Sure, there's no reason that wouldn't work. 0 -
OK, thank you! That was what the OP was all about. 0 -
Can you please take a look at these questions: - Can you park a domain on top of an addon or subdomain like you can on top of the main domain?
- I presume in cPanel it's only possible to park it on top of the main domain?
- In WHM you can park it on top of main, addon, and subdomain?
- Is parking actually creating a redirection and what type of redirect is it, 301, 302, etc?
0 - Can you park a domain on top of an addon or subdomain like you can on top of the main domain?
-
When I tried to park a domain on top of one of my existing addon domains I got this message: [QUOTE]There was a problem parking (aliasing) the domain "parked.com" on top of the domain "addon.com": (XID 2q95p8) This domain points to an IP address that does not use the DNS servers associated with this server. Transfer the domain to this server"s nameservers at the domain"s registrar or update your system to recognize the current DNS servers. To do this, use WHM"s Configure Remote Service IPs interface. 0 -
OK, so I've added the registrars nameserver IP to the "Configure Remote Service IPs" and I was able to park the domain. I'll update you as I progress. 0 -
Since you found the answer to #1, let's do #2 :D A park is just an entry on the ServerAlias line in the Apache configuration that tells Apache, "hey, load the same content for parkedomain.com as you do for otherdomain.com, okay?" And that's pretty much it. 0 -
[COLOR=rgb(41, 105, 176)]Please check if my DNS records are OK.
For me it looks like you are trying to host dns records for domain.com in 2 places. :rolleyes: That will not work.0 -
I want to point out one more important thing directly related to my example of adding a parked or addon domain for the purpose of only hosting email. By default, you are NOT allowed to add a parked/addon domain that resolves to other servers, that is, DNS is hosted elsewhere. To do this currently, there are two options: - WHM > Tweak Settings > Domains > Allow Remote Domains
- WHM > IP Functions > Configure Remote Service IPs > Remote Name Server IPs (IP addresses of remote nameservers that your system uses).
0 -
Here are the corrected DNS records: - web/DNS mail.domain.com. A 123.123.123.123 domain.com. MX mail.domain.com. domain.com. TXT "v=spf1 +a +mx +ip4:456.456.456.456 +ip4:123.123.123.123 ~all" default._domainkey TXT "v=DKIM1; k=rsa; p=...;" SPF and DKIM are from the email server.
0 -
I'm not completely sure what you're looking for at this point? You are correct that the remote option would likely need to be enabled in most cases in order to create the domain, but pointing a domain to a different mailserver is as easy as editing the MX record (and likely ensuring there is a corresponding A record to go with it, if necessary) What specifically are you trying to achieve at this point? 0 -
OK, here is the deal. I will lay out my unorthodox setup and will probably update it with answers later when I get the results. Whoever wants to follow is welcome. - My domain (site.com) is parked (DNS hosted) at the registrar and I want to stay that way because I like the options they have.
- I don't want a site on this domain, I just want to host mail (on my server).
- I've parked the domain on my server on top of one of my addon domains (boss.com).
- I've created a wildcard redirect (301) from the site.com to boss.com at the registrar.
- I've created a mailbox (mail@site.com).
- My server has shared IP 1.2.3.4 and hostname host.king.com.
- The cPanel account with boss.com and site.com are on dedicated IP 5.6.7.8 and I've set up the Exim to send mail from dedicated IPs.
- A (mail.site.com - 5.6.7.8)
- MX (site.com - mail.site.com)
- TXT (v=spf1 +a +mx +ip4:5.6.7.8 ~all) - a record from my server for site.com
- TXT (v=DKIM1; k=rsa; p=...) - a record from my server for site.com
- MX (site.com - host.king.com)
- TXT (v=spf1 +a +mx +ip4:1.2.3.4 ~all) - a record from my server for host.king.com
- TXT (v=DKIM1; k=rsa; p=...) - a record from my server for host.king.com
0 -
OK, there were some errors in the previous post. I'll lay out the setup once again and how I was able to achieve it. - I have two sites, boss.com and site.com.
- boss.com is hosted on my server.
- site.com doesn't have hosting and is only parked at the domain registrar (DNS is hosted at the registrar).
- site.com's only purpose is to protect an alternate name of boss.com so I created a 301 redirection at the domain registrar from *.site.com to boss.com.
- But I still want to host email for site.com on my server so I parked it on my server to create email accounts (remember, its DNS is still hosted at the registrar).
- I added the following records to the site.com's DNS at the registrar (my records are blue):
A site.com 9.9.9.9 ==> resolves to host.registrar.com
CNAME *.site.com host.registrar.com
[COLOR=rgb(41, 105, 176)]A mail.site.com 5.6.7.8
MX site.com mail.site.com
- Mail is successfully hosted, but because of the [COLOR=rgb(41, 105, 176)]
A mail.site.com 5.6.7.8
record the redirection from *.site.com to boss.com now has an exception for mail.site.com which now points to my server. Since it is pointed to my server where site.com is parked, Apache classifies parked site.com as a ServerAlias. So, when you type mail.site.com in the browser's address bar, boss.com's content is shown but mail.site.com is still present in the address bar. I can only explain this with the fact that ServerAlias is just a domain mask for its main domain. - So I added a 301 redirection in boss.com's .htaccess file from mail.site.com to boss.com.
0 -
That sounds like the perfect way to handle that. 0
Please sign in to leave a comment.
Comments
23 comments