Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why can't I see my own business website?

Just launched a new website (12ptcreative.com) and it seems to be live to everyone except me on my iMac. I can see the site fine on my iPad and iPhone at home, but when on my desktop computer I receive the "Safari can't open the page "12ptcreative.com" because Safari can't connect to the server "12ptcreative.com".


Safari is v 8.0.8

Imac is (27-inch, Late 2009) running v 10.10.5

Internet is Xfinity (Comcast)


I have emptied the cache.

I have shut off extensions in preferences.

I have deselected "Allow Plug-ins".

I have restarted my router.

I have quit Safari and restarted after trying each of these items above numerous times.


As a work around, I downloaded Google Chrome and surprisingly, my site won't load on it either.

So...I'm super perplexed. Of course if it was just some random website I wouldn'y give a @$&1, but it's my business website, so it's sort of important.


Any suggestions????

iMac, OS X Yosemite (10.10.4)

Posted on Aug 31, 2015 6:04 AM

Reply
Question marked as Best reply

Posted on Aug 31, 2015 9:28 AM

You, or someone else using your computer, may have hacked the system to redirect queries to certain servers. The file modified is /etc/hosts.

The easiest way to fix the hosts file is to restore it from a backup that predates the modification, or to copy the unmodified file from another Mac. Sometimes there is an unmodified copy with the name "hosts~orig" alongside the modified hosts file on the same Mac; if so, you can copy the contents of that file into the hosts file. Ask for guidance if you need it.

If you can't do any of the above, see below.

Back up all data before proceeding.

If you have more than one user account, you must be logged in as an administrator.

Triple-click anywhere in the line below on this page to select it:

open -e /etc/hosts

Copy the selected text to the Clipboard by pressing the key combination command-C.

Launch the built-in Terminal application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting. A TextEdit window should open. At the top of the window, you should see this:

##
# 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

Below that, you may see some other lines. The first 9 lines should be exactly as above, apart from differences in the blank space within lines. Otherwise you can't use this procedure—STOP and ask for guidance.

If the contents of the TextEdit window are as described, and there are extra lines in the file, close the window, then enter the following command in the Terminal window in the same way as before (by copy and paste):

sudo sed -i~ '10,$d' /etc/hosts

This time you'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. If you don’t have a login password, you’ll need to set one before you can run the command. You may get a one-time warning to be careful. Confirm. Quit Terminal.

If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. Log in as one and start over.

That will fix the hosts file. There is now a copy of the old hosts file with the name "hosts~" in the same folder as "hosts". You can delete the copy if you wish. Don't delete the file named "hosts".

2 replies
Question marked as Best reply

Aug 31, 2015 9:28 AM in response to chadilac71

You, or someone else using your computer, may have hacked the system to redirect queries to certain servers. The file modified is /etc/hosts.

The easiest way to fix the hosts file is to restore it from a backup that predates the modification, or to copy the unmodified file from another Mac. Sometimes there is an unmodified copy with the name "hosts~orig" alongside the modified hosts file on the same Mac; if so, you can copy the contents of that file into the hosts file. Ask for guidance if you need it.

If you can't do any of the above, see below.

Back up all data before proceeding.

If you have more than one user account, you must be logged in as an administrator.

Triple-click anywhere in the line below on this page to select it:

open -e /etc/hosts

Copy the selected text to the Clipboard by pressing the key combination command-C.

Launch the built-in Terminal application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting. A TextEdit window should open. At the top of the window, you should see this:

##
# 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

Below that, you may see some other lines. The first 9 lines should be exactly as above, apart from differences in the blank space within lines. Otherwise you can't use this procedure—STOP and ask for guidance.

If the contents of the TextEdit window are as described, and there are extra lines in the file, close the window, then enter the following command in the Terminal window in the same way as before (by copy and paste):

sudo sed -i~ '10,$d' /etc/hosts

This time you'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. If you don’t have a login password, you’ll need to set one before you can run the command. You may get a one-time warning to be careful. Confirm. Quit Terminal.

If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. Log in as one and start over.

That will fix the hosts file. There is now a copy of the old hosts file with the name "hosts~" in the same folder as "hosts". You can delete the copy if you wish. Don't delete the file named "hosts".

Aug 31, 2015 11:44 AM in response to Linc Davis

THANK YOU VERY MUCH.


I had to google how to access the /etc/hosts file, but once I found the step by step instructions I was able to find the issue. Somehow my own site as listed with an IP address of 127.0.0.1 which blocks sites.


AMAZING! I have no idea how that could happen...I'm the only user, but all is well in the world again.


Thank you for your time in assisting me.


Chad

Why can't I see my own business website?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.