Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Two different hosts one domain

Author
Message
Oster200
14
Years of Service
User Offline
Joined: 21st Jan 2011
Location:
Posted: 12th Jul 2012 05:59
i have a host that i like and they give me a lot of what i need except for when i want to use phpmail(). I relize a lot of people abuse this so it is for saftey but i found another host that lets you use it but dosent give you as much as my other main host does. so i have a domain name Lets say i have example.com can i have two websites with different host have same domain? i want one so you have a forum its running but when you register it will send you email which i need phpmail() so that would be on other host and have the website on the other but with a different host under the same domain.

What does Star Trek and toilet paper have in common?

Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 12th Jul 2012 07:33
The hosts can't use the exact same name, how would traffic resolve which server to route to? You could have one as .com and the other as .net though

bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 12th Jul 2012 12:12 Edited at: 12th Jul 2012 12:26
ick. You wouldn't want to use .net and .com... I mean you could, but just no.

That's what subdomains are for. In your domain manager

You'd have whatever.example.com point to server 1, whatever2.example.com point to server 2.

You'd have www.example.com point to whichever server hosts your website.

You'd have example.com also point to whichever server hosts your website (so that people can get there via example.com or www.example.com, you'd probably want to setup a permanent redirect from example.com to www.example.com)

You'd have mx records setup to forward incoming mail to whichever server you want.

You'd have SMTP setup to send out mail from whichever server you want. phpmail() can be setup to use SMTP in your php configuration.

Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 13th Jul 2012 06:57
Youre right, much better solution

Login to post a reply

Server time is: 2025-05-18 18:40:37
Your offset time is: 2025-05-18 18:40:37