Create a Mobile Website with a Mobile Subdomain and XHTML MP

You can create a specific mobile version of your website by making a mobile subdomain and using XHTML MP.

The common way to make a mobile subdomain is to use the word “mobile” or the letter “m.” For example, if your website is, then your mobile subdomain would be either or Also, you might first want to try looking at some website builder reviews to get yourself acquainted with this stuff. Of course you could name your mobile subdomain anything you wanted to name it, but using either “mobile” or “m” is following a general naming convention and gives your users an easier way to find your mobile website since your users may already be familiar with seeing the word “mobile” or the letter “m” to signify the mobile versions of other websites.

Once you’ve decided on what you’re naming your mobile subdomain, then you can begin thinking about how you’re going to code it. That’s where XHTML MP comes in. XHTML MP stands for Extensible HyperText Markup Language Mobile Profile. If you already know XHTML, then your job coding your mobile website is going to be easier than it is for someone who has coded websites strictly in tables. XHTML works with CSS to separate the presentation from the code. XHTML MP also works with CSS as well as WAP CSS.

The first line at the top of the page is where you would put the xml declaration. It should read: and then the second line is where you would put the DOCTYPE declaration. That should read: . And then you would set up the rest of the page as you do a regular XHTML page with the html tags, head tags, and body tags. Keep your pages short and use anchors where necessary to ease the scrolling for your visitors.

As you’re coding your mobile website, keep in mind that people will be visiting your mobile website from a variety of mobile devices that have a wide range in screen sizes. Some mobile phones have small screens from which you can only view images at a maximum width of 120 pixels. If you have your image made wider than this, it may get cropped in a smaller screen. There are different ways you can work around it once you’re more familiar with creating mobile websites, but when you first start out, try to stick to the 120 pixel width for your images.

If you’ve chosen to set up your mobile website as a mobile subdomain of your main website and operate it as its own website, you’ll need to make sure you don’t duplicate your content. To prevent this from happening, make a robots.txt file for your mobile subdomain to disallow search engines from indexing your mobile website. If the content is going to be written fresh and will not be a copy of your regular website, then you don’t have to worry about the duplicate penalty as much.

Designing mobile websites can be fun and challenging and always evolving.