This
article refers to building sites in iWeb, but the basic principles are
the same for any web-page creation program. When you make a site in
iWeb, and upload it to your iDisk, it is placed in the Web/Sites
folder, and appears at the URL (address) http://web.me.com/username. You can then buy a domain name from a suitable provider, and set up 'Personal Domain' so that your site can be reached at http://domain.com, and subsequent file and folder names in the URL will appear on the end of that rather then web.me.com/username: e.g. http://domain.com/filename.html instead of http://web.me.com/username/filename.html. The basic instructions are given here
but will vary in detail between domain name providers. (when choosing a
domain name provider you should ensure that you will be able to edit
the CNAME.)
So far so simple: but what if you want to have two
sites, and have them referred to by two domain names? 'Personal Domain'
refers to anything within the Web/Sites folder, and you can't do this
with a second domain name.
One method is to buy the MobileMe Family Pack:
this gives you four extra accounts, which work just like the main
account except that they have only 5GB of iDisk space. You could build
your second website on one of the sub accounts, but you would have to
do this using a different user account on your Mac in order for iWeb to
access the sub-account and to keep Personal Domain separate: it works,
but it does add extra expense.
It's possible to do it after
a fashion on one MobileMe account, but it should be thought through before you
start. Only one site can be accessed with the simple Personal Domain URL - let's call it http://domain.com. You need to build this site first
in iWeb (you can change this - see below - at a later stage but that
will of course involve changing the forwarding for the second site).
When you do this and upload it to
MobileMe, you get this file structure:
In
the root level of the
Web/Sites folder you get a file called index.html which uses simple
coding to forward you on to the actual site (showing the new URL in the
address bar). The actual site is contained in a folder within the
Web/Sites folder and its start page is called index.html, which
immediately bounces you on to the first page you created, e.g.
Welcome.html.
So, supposing you have called your site Site1 in iWeb, when you go to http://web.me.com/username it
will call the first index.html file (because if you enter any folder
name only, the browser will always go to a file called index.html
within it, if there is one). This file will immediately bounce you on
to the index.html file within the Web/Sites/Site1 folder
(which will bounce you on to, for example,. welcome.html) and the
URL
will show as http://web.me.com/username/Site1/Welcome.html; with Personal Domain enabled you can reach it at http://domain.com which will show http://domain.com/Site1/Welcome.html in the address bar.
Now
you want to add a second site. You can just add a new site from the
File menu in iWeb: this will be placed in a separate folder, say Site2.
Now you will have sites within both Site1 and Site2 folders within the
Web/Sites folder. However, the index.html file at root level will continue to refer to Site1.
So the URL you would enter for Site2 is http://web.me.com/username/Site2; and your Personal Domain forwarding means that you can also reach it at http://domain.com/Site2. You can't stop it doing this, but of course you don't need to advertise the Site2 URL or provide links to it from Site1.
Now
you purchase a second domain: domain2.com. As we've seen, you can't use
Personal Domain with this as the facility is already in use. However,
you can still forward to Site2 from your domain. Most domain name
providers allow forwarding with 'masking', 'cloaking' or 'frames' (all
the same thing). You simply enter http://web.me.com/username/Site2 as the URL to foward to. Now http://domain2.com
will take you to Site2: the difference from Personal Domain is that
this will remain in the address bar as you navigate the site, and won't
show the subsequent filenames, so of course individual pages can't be
bookmarked. (Disconcertingly, if you provide links to outside sites
your domain name will continue to show, so you should code these to
open in a new window). You can of course do this procedure with more sites if you want to.
If you change your mind and decide that you want Site2 to be the one accessed from http://domain.com
then you can select Site1 in the list at the left of iWeb and drag it
below Site2: now Site2 will become the site forwarded to by the root
index.html and thus from your domain.
If your domain name provider doesn't
provide this sort of forwarding (unlikely, but they might just only
provide the sort that bounces you on to the actual URL) but provides
webspace, you can do this type of forwarding yourself. Copy the
following into a text editor in plain text format:
<HTML>
<HEAD>
<TITLE>NAME
OF YOUR SITE</TITLE>
</HEAD>
<FRAMESET COLS="100%" BORDER=0 FRAMEBORDER=1>
<FRAME SRC="URL
OF YOUR ACTUAL HOME PAGE" NAME="NAME OF YOUR SITE"
MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=1>
</FRAMESET>
</HTML>
and
save it to the web space as index.html. (In TextEdit make sure it's index.html and not index.html.txt which won't work).
Note
that with both Personal Domain and simple forwarding, the original
web.me.com URLs still exist, and it is these which will be indexed by
search engines, not the domain name version.