• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

mail.onedomain.com is displaying www.anotherdomain.com in browser

michaellunsford

Regular Pleskian
I don't know why this is happening, but it is very curious to say the least.

A client called me today and asked why typing "mail.theirdomain.com" in their browser is displaying "www.anotherdomain.com" Honestly, I had never thought to put the SMTP address in an internet browser -- but the question stands.

details... if I try any domain that's being hosted on this server using the "mail" subdomain, it's displaying the www from the "default domain."

how to fix?
 
it's absolutely correct because mail.domain.com resolves to your server ip..

in easy words -- each site is defined in apache as virtualhost with specific ip and specific servername. when you type "domain.com" in browser and press enter, ip of this domain.com is resolved, browser connects this ip and asks to show 'domain.com'. apache checks if virtualhost with such ip AND such servername exist and if such pair is not found then apache shows you default virtualhost/domain..
 
if such pair is not found then apache shows you default virtualhost/domain..

Typing in bubba.somedomain.com reports

cant open the page http://bubba.somedomain.com/ because it cant find the server bubba.somedomain.com.

There are other plesk hosts that have figured this out. For example, I'm still doing some hosting outside of my server through another provider. I know that three of my domains are on the same server. If I type in mail.domain.com, I get that domain's www page -- not somebody else's.

So, what if I add the "mail" subdomain into all of the domains on ths server? Would that throw off the SMTP stuff? Is this a real solution?
 
There are other plesk hosts that have figured this out. For example, I'm still doing some hosting outside of my server through another provider. I know that three of my domains are on the same server. If I type in mail.domain.com, I get that domain's www page -- not somebody else's.

------------

Hmm.. I don't think psa will let you create another mail subdomain in the DNS as there should already be an MX and A record for mail.domain.com.....

On your other domains, can you specify the plesk version that displays your mail.domain.com to www.domain.com.... I've actually never had to mess with this :) I would like to know how they did this; does your outside server use qmail like your current box surely does?
 
The site that was working properly had a dedicated IP address, so any requests going to the mail sub-domain were being redirected to www (while still displaying mail.domain.com).

The workaround on shared IP appears to be creating a "mail" sub-domain in the domains/sub-domains section, then creating an index file with javascript or php header redirect to the www sub-domain.

incoming mail appears to be unaffected by the mail subdomain.
 
Back
Top