How to point web and mail server to different hostings

To point a web and mail server to different hostings, you'll need to configure your DNS (Domain Name System) settings and update your server settings. Here's a step-by-step guide to help you achieve this:

Prerequisites:

  1. You have a domain name registered with a registrar (e.g., GoDaddy, Namecheap).
  2. You have a web hosting service (e.g., Bluehost, HostGator) and a mail hosting service (e.g., Zoho, Gmail).
  3. You have access to your DNS settings (usually through your registrar or hosting provider).

Step 1: Update DNS settings

  1. Log in to your registrar's control panel and navigate to the DNS management section.
  2. Create a new DNS record for your domain name:
    • Type: A record (for web hosting)
    • Hostname: @ (or leave blank for the root domain)
    • IP address: The IP address of your web hosting service
    • TTL (Time To Live): Leave it at the default value or set it to a lower value (e.g., 300 seconds)
  3. Create another DNS record for your domain name:
    • Type: MX record (for mail hosting)
    • Hostname: @ (or leave blank for the root domain)
    • Priority: 10 (or a value that suits your mail hosting service)
    • Mail server: The mail server of your mail hosting service (e.g., mail.zoho.com)
    • TTL (Time To Live): Leave it at the default value or set it to a lower value (e.g., 300 seconds)

Step 2: Update server settings

  1. Update your web hosting service's settings:
    • Update the server's IP address to the one you specified in the DNS A record.
    • Update the server's document root to the desired location (e.g., /var/www/html).
  2. Update your mail hosting service's settings:
    • Update the mail server's IP address to the one you specified in the DNS MX record.
    • Update the mail server's configuration to use the desired mail server settings (e.g., mail.zoho.com).

Step 3: Verify the changes

  1. Wait for the DNS changes to propagate (this may take up to 48 hours).
  2. Test your web hosting service by visiting your domain name in a web browser.
  3. Test your mail hosting service by sending an email to your domain name's email address.

Additional tips:

By following these steps, you should be able to point your web and mail server to different hostings. If you encounter any issues or have further questions, feel free to ask!