I was trying out Apple’s new MobileMe service and I was having a hard time registering my computer for sync. I would click the Register button and things would spin for a while and then nothing. No error message of any sort, it would just stop and the registration would fail. After searching log and hard on the web, I found an article that offered a number of potential solutions. It turned out my problem was a series of entries in my /etc/hosts file for mac.com. I edited the file and removed the entries and voila, registration worked.
Do the following:
1. Type ’sudo nano /etc/hosts’ in the terminal. Type your admin password.
2. Delete any line that is related to dotmac. By default /etc/hosts contains only four entries.
You can easily delete them from the command line by using the arrow
keys to get to the right line, then press CTRL+K to cut them out.Save the file (CTRL+O then ENTER) and close the terminal window.
3. Either wait for the OS X DNS server to reload the file, or restart your computer. I did the latter, just to be sure.

I’m in MobileMe hell. I’ve had three chats with their AWFUL support people and I’m getting nowhere. I’ve seen this posted as a solution for a few people but when I check mine, I see 4 lines with no mention of MobileMe or .Mac or anything like that. What should it say? If I delete it all will it rebuild?
If you only have 4 lines in your /etc/hosts file, this is likely not your problem. Your lines are probably similar to:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
That’s what my hosts file looks like now (and works). Yours is probably similar so I don’t think this is your issue. Sorry.
A far easier way is to log in to iTunes with the Mobileme information. While there, I went to my account information. Without closing iTunes, I then went to Mobileme to register the computer and it registered right away. Go figure