What "Could Not Resolve Host Github.com" means

This error means your computer tried to reach GitHub but couldn't translate the web address github.com into the IP address it needs to actually connect. Your device is asking a DNS server — a kind of internet phonebook — "What number goes with github.com?" and either getting no answer, a wrong answer, or no response at all.

The error itself is not a sign that GitHub is down everywhere. It means your specific computer, network, or internet provider cannot currently reach the DNS service it relies on. This is fixable, and the fix depends on where the breakdown is happening.

Key Takeaways

  • This error happens when your computer cannot reach a DNS server or when the DNS server cannot find github.com, not necessarily because GitHub itself is offline.
  • The fastest fix is usually to restart your router and computer, which clears temporary connection problems and forces a fresh DNS lookup.
  • If restarting does not work, switching to a public DNS service like Google's (8.8.8.8) or Cloudflare's (1.1.1.1) can bypass problems with your internet provider's DNS.
  • Firewall software, VPN settings, or network filters can block DNS requests, so checking those is the next step if basic fixes fail.
  • Testing whether other websites load tells you whether the problem is specific to GitHub or affects your entire internet connection.

Start with the simplest fix: restart your router and computer

Before troubleshooting anything else, restart both your router and your computer in this order. Turn off your router, wait 30 seconds, then turn it back on. Once the lights stabilize (usually one to two minutes), restart your computer. This clears temporary DNS cache problems and forces your device to request a fresh lookup of github.com.

This solves the problem in roughly half of cases where the error is temporary. After restarting, try reaching GitHub again. If it works, you are done. If not, move to the next step.

Check whether the problem is specific to GitHub or affects all websites

Open your browser and try to reach a different website — Google, Wikipedia, or your email provider. If those sites load normally, the problem is specific to GitHub or to how your network is handling GitHub's address. If no websites load, your internet connection itself is broken or your DNS is completely offline, which is a different problem.

If other sites load but GitHub does not, the issue is usually DNS-related rather than a network outage. This narrows down what to try next.

Switch to a public DNS service to bypass your provider's DNS

Your internet provider runs DNS servers that your computer uses by default. If those servers are slow, misconfigured, or filtering certain sites, you can tell your computer to use a different DNS service instead. Two widely used public options are Google's DNS (8.8.8.8 and 8.8.4.4) and Cloudflare's DNS (1.1.1.1 and 1.0.0.1).

On Windows, right-click the network icon in your system tray, select "Open Network & Internet settings", then click "Advanced network options" and "Change adapter options". Right-click your active network connection, select "Properties", find "Internet Protocol Version 4 (TCP/IPv4)", click "Properties", and select "Use the following DNS server addresses". Enter 8.8.8.8 for the preferred server and 8.8.4.4 for the alternate. Click OK and restart your browser.

On macOS, open System Settings, go to "Network", select your connection, click "Details", choose the "DNS" tab, click the plus button, and add 8.8.8.8 and 8.8.4.4. Apply the changes and restart your browser.

After changing DNS, wait a minute and try GitHub again. DNS changes sometimes take a moment to take effect.

Check your firewall and security software settings

Firewall software, antivirus programs, and network security tools can block DNS requests or intercept connections to specific sites. If you have installed security software recently or changed firewall rules, that may be the cause.

Look for any security software in your system tray or settings. Common programs include Windows Defender (built into Windows), Norton, McAfee, Kaspersky, or Bitdefender. Open the program's settings and look for options related to DNS, web filtering, or blocked sites. Some programs have a list of blocked addresses — check whether github.com appears there. If it does, remove it or disable the filter temporarily to test.

If you use a VPN, disconnect it and try GitHub again. VPNs route your traffic through a different server, and some VPN configurations can interfere with DNS lookups.

Check your network's DNS settings if you are on a work or school network

If you are using a computer on a work network, school network, or shared WiFi with a captive portal (a login page that appears when you first connect), the network administrator may have configured DNS filtering. This is common in schools and offices to block certain categories of sites.

If you control the network, check your router's admin panel. Log in (usually at 192.168.1.1 or 192.168.0.1 in your browser), look for DNS or DHCP settings, and verify that DNS is not being filtered or redirected. If you do not control the network, contact the network administrator and ask whether GitHub is blocked.

If you are on a guest or public network and cannot reach GitHub, the network owner may be intentionally blocking it. Switching to a different network or using mobile data is the only workaround in that case.

Clear your DNS cache if the problem persists

Your computer stores recent DNS lookups in a cache. If that cache contains incorrect information about github.com, clearing it can help. On Windows, open Command Prompt as administrator (right-click and select "Run as administrator"), type ipconfig /flushdns, and press Enter. You should see a message saying "Successfully flushed the DNS Resolver Cache".

On macOS, open Terminal and type sudo dscacheutil -flushcache, then press Enter and type your password when prompted. Restart your browser and try GitHub again.

Frequently Asked Questions

Does this error mean GitHub is down?

Not necessarily. The error means your computer cannot reach GitHub's address, but that could be because of your DNS, your network, or your firewall — not because GitHub's servers are offline. Check a website status service like GitHub's status page (status.github.com) or try accessing GitHub from a different device on the same network to see whether the problem is widespread or specific to your setup.

Why does GitHub work on my phone but not my computer?

Your phone and computer may be using different DNS servers. Your phone might be using your mobile carrier's DNS while your computer uses your router's DNS. This suggests the problem is with your computer's DNS settings or your router's configuration, not with your internet connection itself. Try changing your computer's DNS to match what your phone uses, or switch both to Google's public DNS (8.8.8.8).

Can a VPN cause this error?

Yes. Some VPNs route DNS requests through their own servers, and if those servers are misconfigured or blocking GitHub, you will see this error. Try disconnecting your VPN and accessing GitHub directly. If it works without the VPN, the problem is your VPN's DNS configuration. Check your VPN's settings for DNS options or contact the VPN provider's support.

What if I have tried everything and GitHub still will not load?

Try accessing GitHub from a different device on the same network (phone, tablet, or another computer). If it works on another device, the problem is specific to your computer's settings. If it fails on all devices, the problem is your network or internet provider. Contact your internet provider and describe the error — they can check whether they are filtering GitHub or having DNS problems on their end.