Apple Intelligence is now available on iPhone, iPad, and Mac!

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

My own website says Website Temporarily Unavailable

When I try to view my own website from my MacBook Pro (Early 2011), I get a Website Temporarily Unavailable screen. Viewed from my phone or any other computer, it's up and running. My site is greenearthphotography.com, it's hosted on SiteGround and I use Chrome, though I get the same screen in Safari and Firefox.


I've done everything that I've found online. First I contacted SiteGround. They did what they could and suggested I contact Apple. I cleared the cache, the history, cleared the local DNS cache, rebooted the router. Nothing has helped.


Any suggestions are greatly appreciated.




MacBook Pro

Posted on Dec 5, 2018 7:58 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 10, 2018 4:40 PM

There is no reason to be modifying your hosts data for this case.


I'd remove entries added there, and would revert to the default contents.


I'd also flush the cache or reboot, as I've sometimes had issues getting the contents of the hosts file reloaded, depending on the particular version of macOS involved.


Using hosts for this will mean you're back in the data every time the IP address changes. Which basically means you're going to get to discover anew why DNS was invented, if you should follow this path.


Your server IP address is already public information.


You'll need to use a text editor at the command line or one of a very few GUI editors, as the usual GUI editors will corrupt the hosts file content.


BDAqua: Accessing the host via IP address only works if the IP address is set up in the web server as an alias for the web site. The IP address will be entered into the web browser, that string will be passed to the web server via the HTTP or HTTPS connection, and that string will be used to select the web site for viewing. If there's no 46.66.65.192, you'll get whatever the web server is configured to use with no matching site. If you enter www.greenearthphotography.com or greenearthphotography.com into the web browser, then that text string will be passed along to the web server, and the web server will look for sites in its configuration, and one or both of those strings will cause the web server to render the web site that's been configured on the web server.


As for the IP address being secret? It's not. To translate from the domain name to the IP address, you can use a command line tool such as dig, or can use the Network Utility.app tool—⌘␠ (command space)—to launch Spotlight, enter Network Utility there to launch the tool. (The location of Network Utility has moved around over the years, and Spotlight is the easiest way to find and launch it irrespective of the macOS version in use.) Network Utility provides access to commands to view various sorts of network information, including the ability to translate a host name to an IP address, and to trace the route to the specified server.

Similar questions

26 replies
Question marked as Top-ranking reply

Dec 10, 2018 4:40 PM in response to ktinco22

There is no reason to be modifying your hosts data for this case.


I'd remove entries added there, and would revert to the default contents.


I'd also flush the cache or reboot, as I've sometimes had issues getting the contents of the hosts file reloaded, depending on the particular version of macOS involved.


Using hosts for this will mean you're back in the data every time the IP address changes. Which basically means you're going to get to discover anew why DNS was invented, if you should follow this path.


Your server IP address is already public information.


You'll need to use a text editor at the command line or one of a very few GUI editors, as the usual GUI editors will corrupt the hosts file content.


BDAqua: Accessing the host via IP address only works if the IP address is set up in the web server as an alias for the web site. The IP address will be entered into the web browser, that string will be passed to the web server via the HTTP or HTTPS connection, and that string will be used to select the web site for viewing. If there's no 46.66.65.192, you'll get whatever the web server is configured to use with no matching site. If you enter www.greenearthphotography.com or greenearthphotography.com into the web browser, then that text string will be passed along to the web server, and the web server will look for sites in its configuration, and one or both of those strings will cause the web server to render the web site that's been configured on the web server.


As for the IP address being secret? It's not. To translate from the domain name to the IP address, you can use a command line tool such as dig, or can use the Network Utility.app tool—⌘␠ (command space)—to launch Spotlight, enter Network Utility there to launch the tool. (The location of Network Utility has moved around over the years, and Spotlight is the easiest way to find and launch it irrespective of the macOS version in use.) Network Utility provides access to commands to view various sorts of network information, including the ability to translate a host name to an IP address, and to trace the route to the specified server.

Dec 10, 2018 3:41 PM in response to BobTheFisherman

Ok, I've been reading how to do this and trying to do it for 2 hours, first trying to return the hosts file to the default configuration in Terminal, using: sudo nano /private/etc/hosts

but it wasn't letting me save over my hosts file (I used these instructions), so then Finder> Go to Folder. However, again I'm not able to save over my hosts file, it says I don't have permission.

So, in Terminal, I used these instructions and just added the one line that was missing from hosts: fe80::1%lo0 localhost

and added my server ip address and domain names again. This is what my hosts folder currently looks like:

##

# 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

server_ip greenearthphotography.com

server_ip www.greenearthphotography.com

server_ip greenearthphotography.com

server_ip www.greenearthphotography.com


Except where it says server_ip is my actual server ip address. I didn't know if that is something I should make public here?

Then I cleared the dns with this command in terminal: dscacheutil -flushcache;sudo killall -HUP mDNSResponder


I cleared my browser cache from the last hour, tried my website again, and it still shows Website Temporarily Unavailable.


I'm not a developer, I have gone in Terminal before, but these are all things that are brand new to me since I've been trying to figure this out.


Thank you, thank you for this idea. Please, please, if you say something like, return your hosts to its default configuration, please give me instructions or a link that you think is correct, or just tell me to Google instructions if you think it's something I can easily find and I won't follow some instructions that will break my computer. I really do appreciate your help immensely, just know I'm not skilled in this area and am having to do lots of research to do what you might think is a simple process.


Dec 7, 2018 12:00 AM in response to dialabrain

Hi dialabrain, Thank you for your suggestion.

I don't have any antivirus software or Little Snitch installed. Do you mean try running one of these while in Safe Mode? I'd rather find a free solution before I pay for a software that may not solve the problem.

I have tried fsck -fy in Safe Mode. That didn't work.


I think there's something in my Library that needs to be removed possibly. Any ideas?

Dec 10, 2018 12:56 PM in response to ktinco22

Flush your DNS cache, and try your browser access again. As you're on OS X 10.13 or later, you can use the following Terminal.app command to flush your network caches:


sudo killall -HUP mDNSResponder


This command is benign, though it'll initially slow down some subsequent network accesses, until the DNS translations are re-retrieved and re-cached.


You'll have to use an admin password for the sudo.


Why? The web server is told which web site to display based on information accessed from and routed to and then sent over from your web browser client. If your local system has cached an old DNS entry or—as was mentioned earlier—the hosts file was modified, then the wrong IP address can be targeted or—and this detail is not applicable in this case, though this is how virtual hosting is implemented on the web server—the wrong host name can be sent over from the web client to the web server.


The Time To Live (TTL) for your DNS entry from your DNS provider is set to 19332, which means that translations will usually be maintained in a local cache for roughly five hours.


Another possibility here is that the Mac is using a different DNS provider than the other devices you're testing with, and the DNS provider that the Mac is using has not updated its translation caches.


When moving a web site around, it's common to lower the TTL values leading up to a server or address or network migration, and to then increase the values after the migration. This increases the load on the DNS servers and slows access traffic, but it makes for a quicker change-over when the new translations are available. Some folks will go as far as gradually lowering the TTL. Returning the TTL to a larger value after the network transition has completed speeds frequent user access, as the DNS translations can be cached for longer.

Dec 10, 2018 8:17 PM in response to ktinco22

Your “published” IP address in public DNS is the address that we are citing.


The IP address you are encountering is coming from a different source; from a local or ISP DNS server cache, or from the hosts file.


I suspect it is the published, public DNS translation that’s correct, and there’s somethung specific to thr Mac that’s either been cached, or that’s been manually configured with a different address.


Ahain, you will beed tomenter the IP address into the web server configuration, or you’ll get a default site. If you’re using shared web hosting here, you likely won’t be able to add the IP address, as there are routinely dozens or hundreds of web sites sharing the same IP address. I would doubt you’re running your own web server or running a private (hosted) server, but—if you are—then you can add the IP address and then will be able to accrss the site via the IP address.


Sources for the “wrong” (misconfigured, stale) IP address are the local hosts file, and the DNS server that has been specified in your System Preferences > Network setup, or thr DNS server address that’s being issued by your DHCP server, or maybe (though unlikely) the address is arriving via another network component.


As a test of the DNS server, set your System Preferences > Network DNS server for your network link to the IP address 9.9.9.9 (Quad9 DNS), or to 8.8.8.8 ( Google DNS) or to 1.1.1.1 (cloudflare DNS), flush your DNS cache, and see if you are now getting the correct translation. This assuming you’re not modifying the hosts file, or have reverted the hosts file.


Dec 11, 2018 12:50 PM in response to BDAqua

OMG!!!!!!!!! SOLVED!!

(I wrote this last night, but the Apple support site is buggy & wouldn't let me post.)

I can FINALLY SEE MY OWN WEBSITE!!!

THANK YOU EVERYONE!!


BDAqua: You alerted me that my WEBSITE IP address was not the same as was showing in hosts. So, I went to https://www.site24x7.com/find-ip-address-of-web-site.html to double check the website IP that you asked me about and it is indeed 146.66.65.192. I changed it in my hosts folder via terminal, tried it again and IT WORKED!! I FINALLY have my website back! This is so über exciting!!! 


BobTheFisherman: You suggested I check my hosts and revert it back to the default. I'd never heard of hosts and spent 2+ hours researching how to do this and that got me very close, and ultimately lead me to entering the correct website IP address into hosts, with the help of BDAqua.


MrHoffman: You let me know the IP address was not secret, but I kept looking for my computer's IP address, which of course, has nothing to do with my website's IP address. Then you suggested the Network Utility, which was giving me my server's IP address, not the website's. It finally occurred to me that I needed the website IP address, so I did a search to find that. www.site24x7.com made that super simple. I entered the corrected website IP address in hosts, then when I used their Ping tool and the pings were going through, I was pretty certain my site was up and running again!! So I checked it and THERE IT IS!! 


I'm over the moon. This has been a thorn in my side for 5 weeks!!


So, it wasn't really one person who solved this, it was a team. I thought I could select all three of you, but turns out I can only select one. And it was mostly BobTheFisherman and BDAqua that got me here. Is there a way to change the Solved designation? But all three of you totally helped and I'm so grateful that you put the time in to help a stranger. I never post on these forums, because I almost always find the answer or I'm in too much of a hurry to wait. Thank you, thank you. I'm sending you all love and will post a video on youtube to help anyone with this same problem to continue passing on the good karma.

Dec 12, 2018 6:33 AM in response to ktinco22

The only reason to be in hosts is if you want to direct, redirect or misdirect domain names to IP addresses, without using DNS.


The hosts file is a hand-maintained, unsynchronized, manual means of getting from a name to an address.


So too is DNS. Though DNS is automatically updated across all hosts either using the same local DNS server pool, or all hosts using public DNS.


You’re getting in trouble here because you’re overriding DNS, with stale translarions in your hosts dile.


You can either keep manintaining these entries as the hosts chane IP addresses and on each system that needs these translations, or you can use a local DNS server pool or—for public hosts and addresses—the public DNS system.

Dec 12, 2018 9:19 PM in response to MrHoffman

I have removed the IP addresses from hosts, and restored hosts to its original default that my Mac came with:

##

##

# 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


I can still see my website on my own laptop. I'll stick to using the public DNS system. Thank you for pointing this out, MrHoffman.


Dec 13, 2018 7:13 AM in response to ktinco22


BobTheFisherman, I restored hosts to its original file removing the IP addresses and I can still see my website. Btw, SiteGround hosts my site and its registered with GoDaddy, whose DNS points to SiteGround. I think it's a shared hosting plan and a public DNS? Anywho, I really appreciate your help and I'm so glad this has been solved.

I suggested you restore your hosts file and you did that to solve the

issue you were having. You are now discussing another issue regarding

accessing your site by IP Address. As I said, you are on a shared

hosting plan and as such you share an IP Address with multiple sites and

that IP Address can change at any time. To get a dedicated IP Address

you will have to discuss that with your hosting company. They likely

will charge you more for a dedicated IP Address.

My own website says Website Temporarily Unavailable

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