I know that Type Drawers is not really the place for this sort of thing. I have had my website www.g-type.com since 2012. Since last October I have had a completely new site with the same address. The problem I have is that I haven't been able to view my own site, old or new, for at least 5 years on my own computer. I can view it on a phone, iPad, Macbook etc. but not on my main iMac. As you can imagine this is very frustrating as I thought it would be solved with the new site. I have tried every fix I read about on the internet, and even had 'experts' come to my house to try to sort it. Still no joy. Any ideas anyone? This is the image that always appears. Yours not very hopefully, Nick.
Comments
$ dscacheutil -q host -a name g-type.com
You should see 134.209.28.229 as the IP address in both cases. If not, look in the /etc/hosts file and remove any g-type related entries there.
I really need a step-by-step for dummies.
The only content I ever added was on a staging site. I certainly never did any web development.
It's neither; this is the result:
Last login: Wed Nov 11 15:32:24 on ttys000
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Nicks-iMac:~ nickcooke$ dscacheutil -q host -a name g-type.com
name: g-type.com
ip_address: 79.170.44.83
Nicks-iMac:~ nickcooke$
Last login: Thu Nov 12 22:00:10 on console
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Nicks-iMac:~ nickcooke$ cat/etc/hosts
-bash: cat/etc/hosts: No such file or directory
Nicks-iMac:~ nickcooke$
I very much look forward to seeing my site again... one of these years.
Last login: Fri Nov 13 15:49:34 on ttys000
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Nicks-iMac:~ nickcooke$ 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
fe80::1%lo0 localhost
79.170.44.83 g-type.com
79.170.44.83 www.g-type.com
Nicks-iMac:~ nickcooke$
Nearly there, but won't let me change permissions of host from Read only to Read & Write in order to overwrite. I unlocked item in hosts info and entered password.
In Terminal type “sudo su” without the quotes, then enter. It’ll ask for your password. (Assuming you’re an admin account, which you probably will be.)
If that was successful the prompt at the start of the line should turn to a #
grep -v g-type /etc/hosts > /etc/hosts
That will remove the g-type lines.
Last login: Fri Nov 13 16:09:52 on ttys000
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Nicks-iMac:~ nickcooke$ sudo su
Password:
sh-3.2#
I’m just following instructions, I haven’t a clue what any of it means.
You sorted it Simon! Well done you genius. At last I can see www.g-type.com on my own computer. I'm impressed, it looks great (though I do say so myself). Thank you so much!
The trouble with that approach is that it simultaneously open the file for read and also write, and the write (destroying its original content) can happen first.
You could put the old stuff back, by doing "sudo su", then (lines starting with "#" are comments so don't matter):
echo "127.0.0.1 localhost" >> /etc/hosts
...
The ">>" means append. If you make a mistake, you can kill the whole thing and start over with
echo "" > /etc/hosts
...
A single ">" means write a new file the beginning. So this kills the contents (and why the previous advice was faulty). HoPe this helps.