Zoho Email For Domains Setup

Zoho EmailIn this post, I discuss how to setup your own domain with Zoho Mail, a hosted email solution from Zoho. Similar to Google Apps, Zoho provides a set of online business tools including office apps, project management, and contact management. At the time of this post the hosted email package has a free option as well as higher tiers for users who need more options. The biggest selling point for Zoho is that none of their apps have advertisements, and so if you are bothered by other webmail solutions that feature ads, Zoho seems to be a good alternative solution. Other than webmail access, the other reasons to use Zoho is that it works with desktop email clients, smartphones, and tablets.

My Requirements For An Email Solution

In order of importance, here is what I was looking for in an email solution.

Integrates with your Domain name

  • I wanted an email solution that would work with my current personal domain that my family uses.

iPhone and iPad Support

  • Everyone in the family has an iPhone, iPod, or iPad that they can use for email.

Apple Mail Support

  • Oh, we do use our Mac computers every now and then, so we need desktop mail.


  • I want to keep email on the server, and not worry about losing it. I can also manage my email from my smartphone when I have time. This is really convenient.


  • Free if possible, but am willing to pay for a good solution on a yearly basis.


  • Not having my kids bombarded with advertisements is a good thing.

Zoho’s Instructions

Step 1: Verify domain ownership
Please verify your domain ownership. This is required to prevent imposters from using domains to send malicious messages. You can follow either the CNAME method or HTML method for verification.

Step 2: Add / import users to your organization
As the administrator of your organization, you have a Control Panel link in your user interface. In the Control panel, click User Details on the left list of options and click Add User option on the top. You can also import a list of users by selecting the Import User option.

Step 3: Migrating data to Zoho Mail
We recommend you to test migration for 2 users before pointing MX records.

Step 4: Point MX records to Zoho
Point the Mail Exchanger (MX) records to Zoho to start receiving mails to your inbox.

Changing My eMail

Steps 1 and 2 were pretty easy. Since I only have 4 users accounts, it took a few minutes to setup my four users in the Control panel. I skipped Step 3, I don’t really keep a lot of personal email. My current email was stored in Apple Mail and I was fine leaving it there. The interesting step is number 4. The Internet works via DNS. The domain naming system allows everyone and everything to find each other on the network. This is accomplished by DNS having different types of records to point requests to the right place. In the case of most personal domains, you have two different parties involved. The first is a domain registrar who takes care of your domain registration. The second is your hosting provider, usually for shared hosting this is a cPanel type hosting provider. When someone tries to email you at user@some_domain_name.net, a lookup is made to the root DNS authority for the .net domains, your registrar is what adds your domain to the DNS authority servers. The root server then sends you to your nameservers specified. Your nameservers are at your cPanel hosting provider. The final step in the lookup is to see what your cPanel nameserver has for what is called the MX records. The MX records have the server that processes your email and ideally where the email is going to go.

Zoho Email For Domains

Your current hosting provider has MX records for its own email processing. What needs to be done, is to remove the current MX records and replace them with MX records that point to Zoho’s servers. This way only your email, emails sent to user@some_domain_name.net, will route to Zoho, but everything else will still be at your current hosting provider. To do this most cPanel hosts make it easy to do this now. Log into your cPanel control panel and scroll down to the Email section. You want to click open the MX Entry icon.

cPanel Email MX Entry

You will first choose your domain name that you want to change the MX records for. This is your main domain. First add the MX entries as Zoho instructs, then remove your current record for your host. When the changes are complete, it should look similar to this:

Zoho MX Records

The DNS changes take a matter of minutes to a couple of hours to propagate to the rest of the internet.

CPanel Password Directories

Wordpress IconThis week I wanted to setup a protected directory on one of my personal sites. CPanel has a built-in feature for setting up password protected subdirectories via the .htaccess file, so I figured I would just use this feature to setup my protected directory. Of course, nothing ever works when you want it to and I soon found out that WordPress was preventing this from working correctly. Every time I tried to access my subdirectory I received a 404 error page from WordPress. After a couple of days of messing with the root .htaccess file, I found a solution.

Edit Root .htaccess

Edit the root .htaccess file and look for the WordPress code which is how Permalinks are created. It will look similar to this.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

You will need to add a new section above your WordPress code similar to this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/subdirectory/(.*)$
RewriteRule ^.*$ – [L]

Substitute the directory you want to password protect for “subdirectory”, and then see if you are now able to get your CPanel password protected directory to work.

Still Not Working!

If it still does not work, then you have another .htaccess file that has the same WordPress code. For my domain, I install the WordPress files in a subdirectory named “main”, and when I inspected the root .htaccess file and the .htaccess file under main, I found the same code. The solution is to remove the WordPress code from the subdirectory in which you have the WordPress files. It should now work.

For further information on WordPress Permalinks conflicting with CPanel password protected directories see:

WebMail URL Redirect

One of the perks of having your own domain name is that you can setup your own email addresses for your domain. While cPanel makes it easy to manage email accounts and have access to webmail applications like Horde, it does not automatically give you a nice simple url for accessing your preferred webmail application. However, with a few extra steps you can fix this.

Step 1: Your WebMail URL

First find out what the login url is to your preferred webmail application. cPanel’s default mail path is http://www.yourdomain.com/webmail. Your web host probably provided you with the default mail url. Once you login, cPanel gives you a variety of options, usually Horde is one of your webmail options. For example the direct url for Horde is usually something like:


Once you determined the webmail url you need to login into cPanel and setup a subdomain.

Step 2: Add The Subdomain

In cPanel find the Subdomains icon and select it. If you do not see a Subdomains option, then your web host does not offer this feature for your account. You may need to have the web host complete this procedure for you or upgrade your account.

In Subdomains, you will want to Add, a webmail subdomain, so that your subdomain will be webmail.domain.com. Do not add the subdomain as mail as this is most likely already being used by your web host for other reasons.

Step 3: Setup Redirection

The last step is to choose Setup Redirection for the subdomain you just added. You want to redirect the subdomain you just added to the direct url for your webmail. For example:

webmail.domain.com should redirect to https://www.domain.com:2096/horde/login.php

Note that it is best to take advantage of SSL and redirect to the https url instead of the regular http url. This provides an encrypted connection. Although most browsers will display a security warning stating that the SSL certificate does not match the domain name, the connection is still encrypted and therefore secure.

Optimize Your MySQL Databases

Many popular PHP applications like WordPress and Textpattern, along with forum software like Invision Powerboard use MySQL databases to store their data and over time these databases require some maintenance. For example if you have deleted a lot of posts from your blog or forum recently, you might consider optimizing your database tables to improve performance.

This tutorial explains how you can run the Optimize Table command in cPanel.

Warning!!! Before you attempt to do this tutorial on your own data, you should backup your MySQL databases either from within cPanel or through your own program, if it has a backup database function. You should not attempt to do this procedure if your software has its own database maintenance functions, like Invision Powerboard which has its own database options in the Administrator panel. Proceed at your own risk!

First log into cPanel and open up the MySQL Databases manager icon. At the bottom of this screen you will find a link for phpMyAdmin. Clicking on this link will open up a new browser window with the home screen for phpMyAdmin.

On this screen, click Databases. This will list all the databases you have setup. Click on the database you want to work on. The database screen will list the tables for the given database.

phpMyAdmin Database Tables

Click the Check All link on the bottom left. Then from the pulldown menu choose Optimize Table.

PhpMyAdmin will give you some information once the operation is done. Close the window and then logout of cPanel on the original browser window. Close out of your browser completely to end the session.

If you are wondering what the Optimize Table command actually does, according to the MySQL Manual it basically defragments your database:

OPTIMIZE TABLE should be used if you have deleted a large part of a table or if you have made many changes to a table with variable-length rows (tables that have VARCHAR, BLOB, or TEXT columns). Deleted records are maintained in a linked list and subsequent INSERT operations reuse old record positions. You can use OPTIMIZE TABLE to reclaim the unused space and to defragment the data file.

In most setups, you need not run OPTIMIZE TABLE at all. Even if you do a lot of updates to variable-length rows, it’s not likely that you need to do this more than once a week or month and only on certain tables.

Note that it is possible to run phpAdmin without going into cPanel, but for the sake of simplicity, this is the easiest way for most cPanel users to find phpMyAdmin.

For more information:

phpMyAdmin: This is the homepage for phpMyAdmin.

WordPress Optimize Your Database: an interesting post describing why you should optimize your WP database.

cPanel User Guides & Help: more links for learning cPanel.

cPanel User Guides & Help

If you have never used cPanel before, you might feel a little bit intimidated, but cPanel actually is the easiest control panel software to use, and this is why it is the most popular panel today in webhosting.

The following three sites cover cPanel in great detail:

cPanelGuide.net is a visual guide. This is a good site to view if you want to see what cPanel’s various screens look like and what options are offered. Note that not all hosts configure cPanel the same way, so not all options may be available or look exactly the same as this.

WebMasterStop.com has an unofficial guide that goes into detail about the various functions in cPanel. This guide offers more description of what each function does and is more helpful once you are comfortable with cPanel. You can also download the guide in zipped PDF format here: The Unofficial cPanel Guide.zip.

cPanel Documentation, the official documentation is also available online. For technical issues you should also register and join the cPanel Forums, which are helpful for when you have a specific problem.

404 Custom Error Page

In cPanel, the Error Pages function allows you to modify the different html pages that a user will see when an error is registered on your site. The most common being the famous 404 Page Not Found error that you get when a page does not exist. This tutorial will show you how to setup a proper 404 Error page, so that visitors to your site will hopefully find what they are looking for.

cPanel lets you save the custom 404 Error page as anything you want, but the default name for it is 404.shtml. It is best to go ahead and code an html file and then upload it to your public_html folder as 404.shtml. You can then view and edit this file by going to cPanel: Error Pages.

As to what to include in your 404 Page, you can use our own WebKeyDesign 404 Page as an example. The basic things to include would be:

1. Your site logo, with a link to your home page.

2. An explanation for the error, like “Sorry the page so and so cannot be found on our site”. If you insert the code <!–#echo var=”REQUEST_URI” –> into your html, this will display the url that the browser requested. On our 404 page, we include the code <!–#echo var=”HTTP_REFERER” –> so that the person knows who referred them to the incorrect page.

cPanel offers the following variables in Error Pages:

  • Referring URL: Displays the URL that referred a user to the page.
  • Visitor’s IP Address: Displays the users IP address.
  • Requested URL: Displays the URL requested by the user.
  • Server Name: Returns the servers name or websites URL.
  • Visitor’s Browser: Displays information about the user’s browser.
  • Redirect Status Code: Displays the error code associated with the error.

3. A Default Page to your site is very helpful, for visitors to learn more about your site. Usually the default page should be a site map, an about page, or at least your home page.

4. Contact Information is essential. Some visitors will want to contact you, so include your contact page or email address for your site. The webmaster@mydomain.com is probably best to use if you are going to put an email address.

Other ideas for your 404 page:

The search box is a good idea. On our default page, we setup a form that simply searches our site through Google, but you could get more complicated, by including your own site’s search box and code. To implement a simple search box include the following form code:

<form action="http://www.google.com/search" name="searchbox"
  method="get" style="margin-left: 2em;" />
  <input type="hidden" name="hl" value="en" />
  <input type="hidden" name="ie" value="ISO-8859-1" />
  <input type="hidden" name="sitesearch" value="Yoursite.com" />
  <input maxlength="256" size="40" name="q" value="" />
  <input type="submit" value="Search" name="btnG"
    style="font-size:75%;" />

You will need to change the Yoursite.com to whatever your actual domain is of course.

Another good idea is a navigation bar for all of your site’s main pages.

One last thing to consider is that Internet Explorer will nto display any 404 Error page that is less than 512 bytes, which means your error page needs to be at least around 12 lines of code.

For more information visit some of these sites: