Koozali.org: home of the SME Server

How to run mail.domain.com local but www.domain.com external?

Offline holck

  • *
  • 322
  • +1/-0
How to run mail.domain.com local but www.domain.com external?
« on: September 04, 2017, 11:47:48 AM »
We host our web-site for www.mydomain.com at Wix, but want to manage mail for mydomain.com locally.

I have set up DNS accordingly
  • Mailx entry for mydomain.com, specifying mail.mydomain.com as mail exchange server for mydomain.com
  • A name records for mail.mydomain.com, pointing to my SME server, and for mydomain.com, pointing to the external server

In server manager I have created the domain mydomain.com and have these hosts:
  • host: mail.mydomain.com, location: self, ip-address: 192.168.10.1
  • host: www.mydomain.com, location: remote, ip-address: xx.xx.xx.xx
It seems to work nicely from outside our local LAN. But inside the LAN, we can't access www.domain.com. Inside the i-bay for domain.com I have a index.html file trying to redirect visitors to www.domain.com. But strangely, when I from inside the LAN try to open www.domain.com, I get a message telling me www.www.mydomain.com's IP address can't be found. And yes, it is www twice.

Any help appreciated,
Jesper H, Denmark
......

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: How to run mail.domain.com local but www.domain.com external?
« Reply #1 on: September 04, 2017, 12:20:42 PM »
remove the index.html file in first instance..

I have several servers with the same setup

for domain.com, on SME side, set "resolve locally"

Offline holck

  • *
  • 322
  • +1/-0
Re: How to run mail.domain.com local but www.domain.com external?
« Reply #2 on: September 05, 2017, 10:35:48 PM »
Thanks, it seems to work now.

Part of the problem was, I think, that I was using a Chromebook on the LAN. And Chromebooks keep local copies of DNS entries...

Thanks again,
Jesper H
......