HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [330]
♦ You have to register a DNS name. Of course, to ensure that a particular name is associated with a page, you need to register that relationship.
Registering a domain name
In this section, I show you how to register a domain using Freehostia.com. Check the documentation on your hosting service. Chances are that the main technique is similar, even if the details are different.
To add a domain name to your site, follow these steps:
1. Log in to the service.
Log in to your hosting service administration panel. You usually see a Control Panel something like the one shown in Figure 1-13.
2. Find the domain manager.
In Freehostia, the domain manager is part of the regular administration panel.
3. Pick a subdomain.
In a free hosting service, the main domain (freehostia.com, for example) is often chosen for you. Sometimes, you can set a subdomain (like mystuff.freehostia.com) for free. The page for managing this process might look like Figure 1-14.
Figure 1-13: This Control Panel shows all the options, including domain and subdomain tools.
Figure 1-14: Use this page to create a subdomain for your account.
4. Look for a domain search tool.
Often, you have a tool, like the one shown in Figure 1-15, that allows you to search for a domain.
5. Search for the domain name you want.
You can type a domain name to see whether it’s available.
Figure 1-15:
I’m searching for aharrisbooks.net — it seems like a good domain name!
6. If the domain name is available to register and you want to own it, purchase it immediately.
If a domain is available to transfer, it means that somebody else probably owns it.
Don’t search for domains until you’re ready to buy them. Unscrupulous people on the Web look for domains that have been searched and then buy them immediately, hoping to sell them back to you at a higher price. If you search for a domain name and then go back the next day to buy it, you often find that it’s no longer available and must be transferred. I’ve also seen people offer to sell you a domain they do not own, buy it up, and sell it at a huge markup.
7. Register the domain.
The domain-purchase process involves registering yourself as the domain owner. Figure 1-16 shows a typical form for this transaction. WHOIS information provides your information to people inquiring about the domain name.
Figure 1-16: Registering the domain name.
8. Wait a day or two.
Your new domain name won’t be available immediately. It takes a couple of days for the name to be registered everywhere.
9. Remember to renew your domain registration.
Domain-name registration isn’t expensive (typically about $10 per year), but you must renew it or risk losing it.
Managing Data Remotely
Web sites often work with databases. Your hosting service may have features for working with MySQL databases remotely. You should understand how this process works because it’s often slightly different from working with the database on your local machine.
Creating your database
Often, a tool like the one shown in Figure 1-17 allows you to pick a defined database or create a new one.
Figure 1-17: You often have to create a database outside of phpMyAdmin.
This database creation step happens because you don’t have root access to MySQL. (If everybody had root access, chaos would ensue.) Instead, you usually have an assigned username and database name enforced by the server. On Freehostia, all database names begin with the username and an underscore. To create a new database, you need to provide a database name and a password. Usually, a MySQL user is created with the same name as the database name.
After you create the database, you can select it to work with the data in MySQL. Figure 1-18 shows the MySQL screen for my database on Freehostia.
Figure 1-18: phpMyAdmin is just like the one on your home machine!
If you look carefully, you see that Freehostia is still using MySQL 4. Therefore, not all SQL scripts in this book