Chrome: "This site can't be reached"

What issue or error are you experiencing?

I have never used local before, so this is new to me, i just downloaded it today

On chrome, firefox, opera, edge, and any browser, once ive installed local and gone through the process of creating a site, when i try to start the site or login to the admin panel i simply get:

“This site can’t be reached”

image

I have just wasted about 2 hours troubleshooting it when all the videos online show it simply working first time, is there some really obvious step that noone is mentioning here that i have missed?
I have a wordpress.org account, it is my understanding that this is all i needed to get started with this?

I have tried deleting the site and starting it again
i have tried uninstalling local and reinstalling
i have tried turning off my PC and turning it on again
i have tried flushing the DNS

its worth noting that in the side bar for windows 10 i have multiple notifications that say:
“local is requesting administrative privileges to modify your /etc/hosts file”
however at no point did a dialogue box ever pop up to actually “allow” this, so perhaps this is the issue?
simply clicking on the notification in the side panel just makes that notification disappear, never to be seen again

I am at my wits end, i was led to believe local was the simplest easiest way to host a site locally to work on it but this is proving to be a huge pain

please can someone provide some insight/assistance.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:
    7.1.2
  • Operating System (OS) and OS version:
    Windows 10 Pro - 22H2

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

error.log (72.5 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @BabyDev

On Windows you likely have a security, antivirus or firewall application that is blocking Local. You could start with this:

Thanks for the reply, yes i forgot to mention in the original post, I dont have any antivirus set on my computer, only windows defender, and i have checked on there and it has not flagged or blocked anything. Also I checked the firewall and couldnt actually see Local as an option, i did think that was strange, but in any case, that doesnt appear to be blocking it either

Are you running other developer applications simultaneously? That could also cause similar issues. Apps like MAMP, XAMPP, or Docker for example.

Another thing you could try is changing your Router Mode to Localhost. Preferences>Advanced>Router Mode and maybe that will get things working.

i can confirm i am using no other developer applications aswell. i havent even heard of the programs you mentioned. i tried changing the router settings to local host and it did not work either. im still seeing the same “this site cant be reached” message

i stil have the “local is requesting permission to edit the hosts file” notification. is there a way to manually allow this? im wondering if this is the cause?

do i need to download and install wordpress for this to work?

in the app the wordpress version is not showing up, but just perpetually loading, see picture below:

Something in your network or your machine is blocking Local from connecting. If you’re sure it’s not a security app/extension then you may need to try rebooting your machine, your router, or using a different connection or VPN.

Are you able to open a browser window and navigate to Wordpress.org?

Did you try changing your Router Mode to Localhost?

yes i can connect to wordpress.org just fine, and yes i tried changing the router mode to localhost, it didnt work, as i said in my first post i have tried rebooting my machine, i have just tried rebooting my router and that hasnt worked. i dont see how using a VPN would solve things.

please can you give me some feedback on the wordpress version comment i made, and also about the permissions to access the hosts file i mentioned earlier

i have just changed the router mode to localhosts once again, and interestingly this time, it has shown me this message:

however when i click the “fix it” button, nothing happens at all…

am i supposed to connect to a host via the link in the bottom right??

please can you give me some feedback on the wordpress version comment i made, and also about the permissions to access the hosts file i mentioned earlier

The WordPress wasn’t loading because Local was trying to make an API call that wasn’t connecting.

Local also needs permission to update the hosts file.

Generally speaking, usually if these are being blocked/restricted it’s due to a security setting somewhere outside of Local, on the machine or something else that’s interferring.

Did you also try editing the domain at some point originally?

At this point it might be better to start fresh.

  • Fully uninstall Local from your computer.

  • Install the latest version of Local on this link.

  • Once installed, please restart the computer.

  • When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).

  • Check and see if the issue still persists. If so, please provide us with an updated log. Retrieving Local’s Log File

Keep us posted and we’d be happy to help further!

new update, for some reason it is now giving me a dialogue box with the following error message, i was not receieving any message or response before

okay ill give this a try

okay ive tried this again with interesting results.
i did everything you asked, including removing ALL files, restarting after uninstall, and restarting again after install. and local is this time starting up, but simply not completing the website setup process, it just perpetually stayed in a setup process for about half an hour.

so the interesting part. I decided to test it in windows sandbox. I installed local, logged in, and set up a website. this time, I WAS prompted to allow access to the hosts file, see image below:

so i accepted it. and this time it finished the setup process very quickly. while the one on my main OS was still processing. also this time it showed the wordpress version which it hadnt before, so i had high expectations that it would work. however when i click to open the site or open the admin panel i am greeted with the same issue, no connection

so from here im not sure where to go. it appears that something must be blocking the permissions dialogue on my system, but i have no idea what. the only background application i thought could be interfering with it is glasswire which i closed down as soon as the system started, i even turned off windows defender temporarily even though by all rights it shouldnt be the cause, and in fact we have eliminated that as the cause because it worked just fine in windows sandbox which did not have windows defender turned off

anyway despite all this, even with the allowed hosts permission, it still does not seem to work, so im at a loss once again. windows sandbox is a complete clean install of windows, so you cant get much more fresh than that.

edit: i just noticed that the site wasnt ‘trusted’ so i clicked the button to trust, and it encountered an error again as follows:

note that this is still in the sandbox environment, which i have left open for now as it may help us to continue troubleshooting

it may be worth noting that i checked windows firewall in the sandbox and local showed up (this check was performed after accepting the dialogue box) whereas local is still not showing up in the firewall on my main system

here is the php log file from the sandbox version, the nginx log file was empty:

error.log (9.2 KB)

so what can you suggest from here?

By chance are you using an office or work network? Some type of VPN?

Could you provide a full Local Log as well? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

no, this is on my own personal PC. not connected to any VPNs or anything.
one thing i can mention is that i am using 2 routers in my home, however the second has been configured simply as a repeater switch, my PC is connected with a wired connection. DCHP is turned off on the second router if that makes any difference to you, it would cause all sorts of issues if it was left on as the main router is responsible for taking care of that. for spatial reasons, i cant connect my PC directly to the main router as i dont have a cable long enough, the second router is there for that reason. in any case, i cant imagine that this is whats causing the problem, i would have thought that as far as local is concerned it is connected to the main router, it probably has no idea its going through a second one

sure here are the local logs for both instances:

local-logs [Sandbox].zip (5.7 KB)
local-logs [Main OS].zip (5.2 KB)

okay so in the meantime i have gone ahead and installed XAMPP as localwp seems to be giving me issues. and it has presented me with some more information. see image below:

so it looks like port 443 is in use by something else which is stopping apache from running.
upon further investigation from inside my router i can see that i have configured this port for remotely accessing my NAS. this is as per the instructions on the manufacturers website. now i dont particularly want to remove remote access to my NAS in order to get this working, is there not any other way?? see their site below with reference to port 443:

https://www.seagate.com/gb/en/support/kb/nas-os-discontinued-remote-access/#:~:text=For%20HTTPS%2C%20fill%20in%20port%20443%20wherever%20it%20asks%20for%20a%20Port%20number

I imagine this may be the cause of the error i am encountering in Local, what do you think?

Yes, it seems like this is the issue since Local uses Port 443 to make requests over HTTPS as mentioned in our Help Article below that goes into port conflicts.

The site should work if you change your Router Mode to Localhost but you mentioned trying that. It might be worth testing it again but doing a full reboot after changing the setting.

If you need to check for any Port conflicts again you should be able to use the command netstat -ano

What you’ll be looking for here is to see when sites are stopped and Local is properly shut down if there are still programs running on ports 80 and 443. Once you run that command you should see a list of listening ports. If you see a particular program making use of those ports, you can then kill that process by running taskkill /F /pid XXX where XXX is the PID number of that process.

I have managed to get it working now, the solution was as follows:

My NAS was claiming ports 80 and 443 so i turned local to use localhost which bypasses the need for these ports.

Local also did not have the right permissions to alter the hosts file, which was causing issues since i was not getting a popup asking me if i would like to allow these permissions. the solution is to manually grant these permissions by doing the following:

  • close local
  • right click the .exe file
  • click properties
  • click the security tab
  • click edit permissions
  • make sure that both ‘Modify’ & ‘Write’ are checked under the ‘Allow’ column

This will now have granted Local the necessary access to modify the hosts file.

Upon opening Local again, an error message appeared on my copy of local saying the following:
“Warning! This site’s WordPress URL settings do not match the host set in Local”

Now clicking “Fix it” actually works and corrects the issue.
Now the links to open the site or enter the WP admin work.

Nick-B, please can you pass on the following suggestions to the relevant team members:

  • Improve the in app error reporting, it took a long time to figure out what the problem was, whereas as soon as i installed and opened XAMPP it told me straight away what the issue was
  • Add the below aforementioned points to your troubleshooting process
    • Looking through the forums, i am not the first person to not be recieving the UAC message to allow Local to modify the hosts file, so can you start propagating the solution i mentioned above, by editing the permissions in properties under the security tab
    • Ensure that people are aware that the ports 443 and 80 must be kept free in order for Local to work under the default settings
1 Like

I’m glad you were able to get things working! Thank you for sharing all of the details of your work and your feedback for not only us but others to find.

A lot of what we discussed in this thread is detailed in our help article about Router Mode and Port Conflicts here:

We do see users who have issues with permissions, security conflicts, etc from time to time but they aren’t always the same culprit, even on Windows. We’re always happy to absorb feedback however and try to make things as easy as possible for users so I can pass some of that along certainly.

You’re also always welcome to create Bugs or Feature Requests specifically in the Forums for others to vote, comment or follow should future needs arise!