Problems blocking MySpace using HOSTS file

A visitor ("Bethany") posted a question:

I did as your instructions said and I'm still able to access myspace. I've pasted my host file below. What else can i do? I really need myspace blocked.

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

0.0.0.0 myspace.com

127.0.0.1 localhost
127.0.0.1 www.myspace.com
127.0.0.1 myspace.com
127.0.0.1 myspace
127.0.0.1 log.myspace.com
127.0.0.1 browseusers.myspace.com
127.0.0.1 classifieds.myspace.com
127.0.0.1 collect.myspace.com
127.0.0.1 events.myspace.com
127.0.0.1 favorites.myspace.com
127.0.0.1 forum.myspace.com
127.0.0.1 groups.myspace.com
127.0.0.1 home.myspace.com
127.0.0.1 invite.myspace.com
127.0.0.1 linux.myspace.com
127.0.0.1 login.myspace.com
127.0.0.1 message.myspace.com
127.0.0.1 messages.myspace.com
127.0.0.1 music.myspace.com
127.0.0.1 mx2.myspace.com
127.0.0.1 myspace.com
127.0.0.1 ns1.myspace.com
127.0.0.1 ns2.myspace.com
127.0.0.1 profile.myspace.com
127.0.0.1 rio.myspace.com
127.0.0.1 search.myspace.com
127.0.0.1 vids.myspace.com
127.0.0.1 viewmorepics.myspace.com
127.0.0.1 vmta01.myspace.com
127.0.0.1 vmta02.myspace.com
127.0.0.1 vmta03.myspace.com
127.0.0.1 vmta04.myspace.com
127.0.0.1 vmta05.myspace.com
127.0.0.1 vmta06.myspace.com
127.0.0.1 vmta07.myspace.com
127.0.0.1 vmta08.myspace.com
127.0.0.1 vmta09.myspace.com
127.0.0.1 vmta10.myspace.com
127.0.0.1 vmta11.myspace.com
127.0.0.1 vmta12.myspace.com
127.0.0.1 vmta13.myspace.com
127.0.0.1 www.myspace.com
127.0.0.1 www1.myspace.com
127.0.0.1 videos.myspace.com
127.0.0.1 mail.myspace.com
127.0.0.1 signup.myspace.com
127.0.0.1 security.myspace.com

Any takers? on my systems, the single entry for myspace.com blocks everything.

Reboot needed? HOSTS file in the wrong location?

Posted by: Mike on Thu, 01/25/2007 at 10:50pm

Can't block myspace.com?

Surely someone has to have some idea why I can't block myspace :(....I've done a reboot and pretty sure that the hosts file is in the right place. I found it using directions given previously. Does anyone know of some software I can buy that would really work and not just claim to work? Thanks to anyone who can help me out here...It's much appreciated ;)

Bethany (not verified) – Fri, 01/26/2007 – 6:59am

When you use too many names,

When you use too many names, as is your case; your host file might have problems loading all of them, so my advice would be to use wildcards, such as (*) at the beginning and end of the website's name you are trying to block. ex: *myspace.com* or simply *myspace* try replacing all your previous names with just this two, and let me know if it works.

Guest (not verified) – Tue, 06/05/2007 – 5:50am

Block myspace with DNS

You can go to your dns server and create a forward lookup zone called myspace.com. Within the zone create a alias and for www and redirect it to www.google.com or whatever you like. You will have to create alias for login.myspace.com, profile.myspace.com profileedit.myspace.com. This should block everything...flush the dns on the servers and workstation and type in www.myspace.com and it should redirect it to www.google.com. I have done this at my work place and for YouTube also...works great without buying any expensive software.

Thanks

Guest (not verified) – Thu, 11/29/2007 – 12:06pm

localhost should be first entry

I think your problem is here:

0.0.0.0 myspace.com
127.0.0.1 localhost

The localhost should always be the first entry above all others. Try this. Close all of you browsers, edit your host file like the example below so that localhost is first. Save the host file and try to get to myspace.

127.0.0.1 localhost
127.0.0.1 www.myspace.com

Guest (not verified) – Sat, 02/23/2008 – 8:59pm

If its a vista machine you

If its a vista machine you have to disable the UAC in the control panel, reboot, then change the host file.

Guest (not verified) – Mon, 03/31/2008 – 5:38pm

erasing

I follow your instructions and it blocks myspace. But when I reboot the hosts entries are gone and I can access myspace. Is there something erasing the hosts file? I think it might be my anti-virus software?

Guest (not verified) – Mon, 07/30/2007 – 1:59pm

My guess..

well, if you were able to block myspace, I don't understand why would you want to access it again?
Anyways, the wildcards won't erase information in your files, they'll just avoid them to be loaded.

kytho (not verified) – Wed, 08/01/2007 – 7:56am

Sorry, my bad...

I misundertood when reading your post.
Ok, first you need to make sure you're making the changes as an Administrator, and then you set the file as "read only" in properties. That should make it!
Remember to save a copy of the original; just in case.

Kytho (not verified) – Wed, 08/01/2007 – 8:03am

Post new comment

This helps us decide if you are a human, and not just some visiting bot.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <h3> <h4> <br> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.
More information about formatting options