Update the “hosts” file on Win7

First, some prep work

Since it’s likely that you’ll use this technique more than once some preparation will ensure things go more smoothly the NEXT time you have to edit your hosts file.

If you pin the Notepad application to your taskbar it will be much easier to locate & run as ‘Administrator.’

Just find the Notepad application & run it normally. Searching for ‘notepad’ in the Start Menu is an easy way to locate the Notepad application.


Once Notepad is running right-click on the Notepad icon in the taskbar.  Then select ‘Pin this program to the taskbar’ from the menu.  The Notepad icon should then remain on the taskbar even when Notepad is closed.


Exit Notepad to confirm that the icon stays in place.  And then we can get on with editing the hosts file.

Opening Notepad as administrator

The key issue with editing the hosts file is that you need to have Administrator rights in order to ‘Save’ the changes that you’ll make to the file.

To run Notepad as Administrator right-click on the taskbar item. This will display a pop-up menu that has a smaller Notepad icon. Right-click on the smaller Notepad icon and then choose ‘Run as administrator’ from the menu.


If everything goes well you’ll see a Windows dialog box asking you to confirm.  Choose ‘Yes’ and Notepad should open.

Opening the hosts file in Notepad

The hosts file is a hidden file in Windows and is not typically visible. There are ways to make it visible but this typically isn’t necessary.

The hosts file is at the location below on most all Windows machines. Go to ‘File => Open’ and copy paste the following line; then click the ‘Open’ button.


Editing the hosts file

Make sure to use a plain text editor like Notepad when editing the hosts file. (i.e. not Word)

In the hosts file any line that begins with the pound sign (#) is considered blank. You can use this to turn an override on or off easily.

Add the IP address and host name to the file with each on a single line. The IP and name can be separated by spaces and/or tabs.

Edits to the hosts file are active as soon as the file is saved. There’s no need to reboot your computer. Though you may need to refresh your browser and/or clear your browser cache to make sure you get the correct domain resolution.


That’s it!

One final tip: If you only use Notepad for editing your hosts file it should always start in the correct folder.  (If you’re using Notepad for anything else then you should probably look into a more serious text editor like Notepad++ or UltraEdit.)

Un-Tynt Your Website (for Apache)

For more on the entire Tynt issue, see Eric Lander’s blog post on Tynt.

If you’re on an Apache server with mod rewrite & want to prevent Tynt from displaying your site here are some rules that may help:

RewriteCond %{REMOTE_ADDR}    ^204\.244\.109\.(2(4[0-7]))$ [OR]
RewriteCond %{REMOTE_ADDR}    ^204\.244\.120\.(1(7[6-9]|8[0-3]))$
RewriteRule ^(.*)$    [F]

You can do plenty of other fun things instead of “RewriteRule ^(.*)$ [F]” if you like. For an example, check out the 404 page for SEOconsultants.com

Many thanks to @IncrediBILL, @pageoneresults, @scottpolk and @ericlander for bringing the situation to light & coming up with the correct IP blocks.

Creating a second FireFox profile for SEO

Note: A link to instructions for Mac users is at the bottom of this post -s

I started reading up on how to develop a FireFox Extension and one of the first recommendations is to create a separate FireFox profile. The second profile is recommended so you don’t have to clutter up your “regular” FireFox profile with a bunch of debuggers and development tools. And, both profiles can be run at the same time. This got me thinking about other uses for 2 profiles:

  • Having 2 profiles would allow you to be logged into 2 different Google accounts at the same time.
  • You could run keyphrase searches and view “personalized” vs generic SERPs.
  • Run one profile through a proxy service to see if your IP address is being served alternate content.
  • Compare different extensions, security settings. Manage an alternate set of bookmarks, etc.
  • Keep your “work” & “personal” browsing history separate.

Here’s the setup for Windows, using FireFox 2.x. I’ll try to add the Mac version shortly

  1. Make sure you close all FireFox windows. In FireFox, “File => Exit” should to the trick.
  2. Run the FireFox Profile Manager. Click on the Windows “Start” button, then choose “Run” Type firefox.exe -ProfileManager in the box next to “Open” and then click the “OK” button.

    Run the FireFox Profile Manager

  3. Create a new profile. Just click “Create,” give it the name seo & hit “Finish.”

    Create a seo FireFox profile

Now that the new profile is created, you need a way to run that profile along with your “default” profile. At this point, any of your usual methods of starting FireFox should bring up your “default” profile. I’m going to roll a couple tips into one here, so you’ll end up with a way to run your “seo” profile AND give it the shiny icon of your choice.

  1. Open Notepad: Start => Programs => Accessories => Notepad
  2. enter the following in Notepad:
    set MOZ_NO_REMOTE=1
    start "" "%ProgramFiles%\Mozilla Firefox\firefox.exe" -P seo
  3. Make sure that the text after -P in the second line is the same as the profile name you created.
  4. Save the file in your “My Documents” folder, and name it “firefoxSEO.bat”

Double-clicking the “firefoxSEO.bat” file will launch FireFox with your “seo” profile. So technically, we’re done and you can start running two FireFox profiles side-by-side right now. But as you can see, the default icon for .bat files is pretty ugly. And there’s no easy way to change it. The default icon can also be a problem later on, if you want to create even more profiles, and would like individual icons for each profile.

The solution is to create a shortcut to “firefoxSEO.bat,” and give it any icon you like!

  1. Right-click on “firefoxSEO.bat” and choose the “Create Shortcut” option.
  2. Move and/or copy the shortcut anywhere you like: your desktop, shortcut bar, QuickLaunch bar, etc.
  3. Now, right-click on the shortcut, and choose “Properties.”
  4. On the second tab “Shortcut” click the button labeled “Change Icon”

    Shortcut Properties & Change Icon button

  5. You may get a message like the following. Just click “OK”

    Icon Warning Message

  6. Now, pick an icon! Usually Windows will direct you to the file %SystemRoot%\system32\SHELL32.dll which has many icons to choose from. There are some additional (& quite retro) icons in %SystemRoot%\system32\moricons.dll
  7. You can also design your own icons with a graphics program, or there are several websites with icons & even some online icon creator sites.

You’re all set!

UPDATE: Here’s a link to Asa Dotzler’s blog where he covers how to create a shortcut to launch a specific firefox profile on mac. Pretty simple to do using Apple Script. -Sally (the Mac user of this team)

Posted in SEO