Total mystery website access problem

I have just come across an incredibly frustrating problem accessing my own website, from my own Mac! It’s completely defeated my attempts to resolve it. It is so weird I thought TibBITS readers might be interested—and suggest a solution!

I run a website at tanamerah.com It’s a Wordpress site, independently hosted by SiteGround (who are superb, by the way). I have been accessing the site for editing or maintenance once or twice a week for the last three years, since I set it up.

This evening I tried to visit it as usual to update a plug-in—but couldn’t. The familiar web address just resulted in a blank page in Safari, followed eventually by a ‘server not responding’ error message. Here’s what I have tried to resolve the issue:

  1. Emptied Safari’s caches, and removed all cookies and website data for tanamerah.com.
  2. Quit and reopened Safari (version 13.1.2 (14609.3.5.1.5))
  3. Used a different browser (Chrome)
  4. Rebooted the Mac (which is running OS Mojave 10.14.6)
  5. Switched to my clean ‘Test’ user account
  6. Switched to a completely different WiFi network (my neighbour’s) connected to a different router

Absolutely nothing has worked. Needless to say, I have changed no settings on my Mac since I last accessed the site a few days ago. I haven’t, to my knowledge, installed any OS updates, nor browser updates. I haven’t touched my network settings for months.

And the problem is limited to just this one site. I can open every other website I have tried. And the mystery is compounded by the fact that I can open the site on my wife’s and my other three MacBooks, and on our iPhones. And I contacted SiteGround: they checked the site too, and could find no problem with it.

Having tried every step I can think of I am completely stumped as to the cause. Clearly it has something to do with the unique combination of my Mac and my website. Something that has occurred in the last 24 hours without any action on my part. I half expect to wake up tomorrow morning to find everything working again—but somehow I can’t see that happening.

So if anyone has any bright ideas about what it might be, and what I could try to solve this puzzle, please let me know!

Thanks in anticipation,
Kevan

That’s probably not it because other computers in the same location (which I assume are behind a NAT router and have the same IP address) can access the site. And he’s tried it using the neighbor’s WiFi, definitely a different IP address.

You don’t have any utilities like little snitch (or anything that firewalls within the computer), do you?

2 Likes

It’s actually very simple. All Unix-based computers (including macOS) include it as a command-line tool. Just type traceroute followed by the destination.

It works by sending out ICMP echo packets (the same ones used by the ping command) with the TTL (time-to-live) parameter increasing from 1 up to some maximum (64 by default). It looks at where the TTL-expired errors come from in order to present a (hopefully accurate) description of the path your packets take from yourself through all the intermediate routers to the destination server. It also records the time elapsed between sending the packet and getting a response in order to estimate performance. Here’s what I get when I do a Traceroute to TidBITS:

$ traceroute www.tidbits.com
traceroute: Warning: www.tidbits.com has multiple addresses; using 172.67.213.57
traceroute to www.tidbits.com (172.67.213.57), 64 hops max, 52 byte packets
 1  gatewayrouter (192.168.1.1)  0.853 ms  0.397 ms  0.287 ms
 2  96.120.81.1 (96.120.81.1)  253.598 ms  54.410 ms  232.611 ms
 3  68.86.200.41 (68.86.200.41)  73.549 ms  76.754 ms  61.230 ms
 4  162.151.58.101 (162.151.58.101)  152.775 ms  27.374 ms  30.658 ms
 5  96.108.106.85 (96.108.106.85)  21.496 ms  186.060 ms  21.982 ms
 6  69.252.19.10 (69.252.19.10)  15.744 ms  43.094 ms  183.883 ms
 7  172.67.213.57 (172.67.213.57)  70.968 ms  117.984 ms  184.873 ms

Traceroute also attempts to do a reverse-DNS lookup in order to present the names of each router, but in this case, it appears that the information was only available for my home router (gatewayrouter), so all we got were IP addresses.

In this particular case, it provided a route to 172.67.213.57, which is a Cloudflare server, probably used by TidBITS to provide resiliency, scalability, DDoS protection and other related services.

2 Likes

Looking at the Siteground site they provide tools to create a website, and tools to move a website to a production environment.
77.104.133.95 is Siteground’s development server, 35.214.121.54 is the IP of your production server.

It looks like your 15" macbook is stuck with the IP for the development machine.
In the network prefs make a new location, and fill that with the working values from one of the working machines. Make it active and reboot. See if that solves the problem.
If not, see if there is an entry in the hosts file
/etc/hosts
that overrides your DNS-queries.

4 Likes

Here is how you check your /etc/hosts

Paste cat /etc/hosts into the Terminal window.

You should see something like this:
macpro:~ paalb$ cat /etc/hosts
##
# 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

4 Likes

If something is poisoning your DNS Cache after reboot it might help to clean the cache temporarily. Quit Safari.
Paste this into your Terminal window sudo killall -HUP mDNSResponder and enter your password + return (You will get no feedback.) Try your website in Safari.

2 Likes

@Shamino @schwartz @angusC @gdewaard @paal

Thanks again to all of you. I am delighted to report a resolution.

That was it.

There was one line at the bottom of the hosts file:
77.104.133.95 tanamerah.com www. tanamerah.com

It was sending my instruction to open tanamerah.com to 77.104.133.95, instead of 35.214.121.54, where it should have been going. As soon as I edited the hosts file to remove that line the issue was resolved.

How that file had a line of code added is worrying. How could any outside agent change a file within my system file structure? I certainly didn’t. I didn’t know that this ‘hosts’ file existed until this afternoon. And nobody has had physical access to my computer since i had the battery replaced under warranty back in March. I’m delighted to have found the solution to my problem—but I’m no closer to understanding how the problem arose.

Sincere thanks again to everyone who has shared their knowledge and contributed their thoughts and their time to resolving what will always remain a weird issue.

Cheers
Kevan Pegley

5 Likes

Wow! What a great debugging session with a happy conclusion, no less!

As far as how that hosts entry got there, the key thing to note is that Kevan accessed the site sometime over the previous week. What were you doing after that Kevan? :slight_smile:

That said, the hosts file has caused more extended debugging sessions than I care to remember (and it’s never obvious that it’s the hosts file). It’s a gloomy place. . . . :smiley:

Dave

4 Likes

@Shamino @schwartz @angusC @gdewaard @alvarnell @Dafuki

Huge apologies to everyone. Looks like the rogue code in the hosts file was added by… me! I checked through my message exchange with SiteGround when I first moved the site to them a year ago, and discovered this:

I am glad to inform you that we have successfully transferred your website to our server. In order to preview your website you can use the hosts file on your local computer. This way, you will point your domain name to your website’s IP address.

The line that should be added to the local Hosts file is as follows:
77.104.133.95 tanamerah.com www.tanamerah.com

So there you have it, in black and white. I’d completely forgotten I’d added that line. The problem arose because recently SiteGround migrated the site to a new server:

On Thursday, June 11, starting from 00:01AM GMT+1 , we will perform an infrastructure upgrade and migrate your site(s) from server uk1005.siteground.eu to a new server with the latest hardware in our new Google facility in London .

Obviously the original server, to which my Mac was pointed, continued to function after the transfer, so I was unaware that the hosts line was still diverting me to it. Until last week that is, when I guess SiteGround shut it down.

Anyway, problem solved—and explained. Thanks again to all your help and comments. May TidBITS, and its readers and contributors, long flourish and prosper.

Best
Kevan

4 Likes

I’d just like say that I’m extremely happy that TidBITS Talk has been able to host this thread. @tidbits17’s problem, even if it turned out to be self-inflicted at a distant point in the past, was mysterious, and the outpouring of highly technical support was great to see. Kudos to you all!

7 Likes

Ditto! This is exactly what TT should be. Not a single negative post, no complaining, no bashing the OP for stupidity, no blaming various companies or products, no side-steps into politics, etc. Just valid suggestions, brainstorming, and theories as to the problem. I was impressed by the OP’s willingness to test and try various solutions, and post updates. Wonderful that the mystery was solved.

For those wondering what kind of discussion list TT is supposed to be, this thread is an ideal example.

8 Likes

Thanks for the kind words! I’ve actually looked into this for some of our articles in the past. Never quite got up the gumption to do it, though—the bar is so freaking high given the work that outlets like the New York Times, the New Yorker, the Atlantic, and the Washington Post produce.

The Pulitzer Prizes

4 Likes