The .mobi domain is unlike all other domains in that it has a set of rules that web site owners must follow — most other domains such as .com, .net, and .org do not have any technical requirements about the content hosted in the domain. The .mobi rules often cause confusion amongst site developers and domain holders so we thought we'd try to help people get their domains to pass muster.
First of all, a quick recap on the 3 mandatory rules. In essence, the rules say the following:
- The home page of your site must be coded in valid XHTML Mobile Profile
- Your site must be available without the user having to type www e.g. domain.mobi
- The home page of your site must not use frames
The full text of this guide is available on this site
here.
Rule 1 – Valid XHTML Mobile Profile
This is probably the most misunderstood mandatory rule. To be clear, this rule states that if a user goes to domain.mobi or "www.domain.mobi" the resulting page must be in a format the device supports or valid XHTML-Mobile Profile 1.0. Essentially this means that, unless you know better, the markup format delivered for your home page must be XHTML Mobile Profile. If you have the means to detect the type of device accessing your site (e.g. you could use
DeviceAtlas to detect if it is a desktop browser such as Internet Explorer or a mobile device) you are perfectly free to send a markup language that suits the device, but if you don't know you should default to XHTML Mobile Profile, since this works on the vast majority of mobile devices released in the last few years. Many live .mobi sites do exactly this: if they detect a desktop browser accessing their site they send a full desktop-formatted page coded in HTML 4, but if they detect a mobile device they send XHTML. Equally, if you know that the device doesn't even support XHTML, you are perfectly free to send WML or cHTML.
The second aspect to this rule is that the XHTML must be
valid. In this case the word valid has a very specific meaning: it means that the markup must comply with the rules of XHTML. How to actually do this is beyond the scope of this article but our
ready.mobi tool gives you a very easy way to check this.
Rule 2 – site available at second level domain
This rule causes some confusion but it really is quite simple. All it means is that, if your domain is domain.mobi, then your website should be available at http://domain.mobi. In other words, you shouldn't require people to have to type in the 'www' each time. Most major websites do this already (think cnn.com etc.) This rule does not say anything more than this — you can still use http://www.domain.com or any other third level domain of your choosing to point at your website, as long as the version without the www works also. This is really just a conveniance for end users because typing the 3 unnecessary characters on a phone is a bit tedious.
There are two steps you need to take to ensure that you follow this rule.
Step 1: DNS
This rule needs to be implemented using the DNS configuration for you website. Essentially we are asking that both www.domain.mobi and domain.mobi point to the same IP address i.e.
- domain.mobi -> 1.2.3.4
- www.domain.mobi -> 1.2.3.4
Depending on where you registered your domain, your DNS configuation may or may not be part of the package. As an example, GoDaddy offers DNS services free of charge with domains purchased on their site. In most case where registrars make available DNS services as part of the domain package they will already have set up the domain records such that the above is the case. Again, as an example, GoDaddy do this by default. When this happens most of your work is done already. The following screenshot shows what this looks like for the particular case of GoDaddy, but each registrar and DNS provider has different approaches to this problem.
Selecting DNS configuration for the domain:
Configuring the IP address for subdomains such as www, mobilemail, pda etc:
Here the '@' symbol for the 'www' third level domain point at the same IP address as the base domain.
Step 2: Web Server Configuration
Once the DNS for your domain is in place, you will then need to configure your web server to respond to both www.domain.mobi and domain.mobi with the same site. Again, how you do this depends on which web server you use and how you configure it. If you are using Apache and configure it by hand, something like the following can be used:
ServerName domain.mobi
ServerAlias www.domain.mobi
ServerAdmin admin@domain.mobi
.
.
.
Much like the DNS configuration described above, many hosting companies and registrars will automatically do this for you and offer simple control panels to configure it.
But I can't access DNS settings…
No need to worry – there is still another approach you can take. On Apache servers, you can set up a redirect such that all requests to http://www.yourdomain.mobi are redirected to http://yourdomain.mobi. To do this you need to edit a special configuration file called .htaccess, by adding the following lines:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.yourdomain.mobi
RewriteRule (.*) http://yourdomain.mobi/$1 [R=301,L]
If this file does not exist, then simply create it, and place it in the root folder of your website (this folder is usually called www/ or public_html/). If it does already exist, then you should add the lines to the current file.
Rule 3 – no frames
The no frame rule in the .mobi registrant rules is probably the easiest rule to comply with. Frames are not supported on many mobile devices, and using them may have unpredictable results. Frames are also considered as being generally problematic on the desktop web also, since they make a web document less accessible.
To ensure that your site is in compliance with this rule, ensure that the home page of your site has no FRAME, IFRAME or FRAMESET elements in it.