Как сбросить кэш днс под windows 10

  1. Главная

  2.  

    Статьи хостинга 1BX.host

  3.  

    Общие статьи


  4. Полная очистка DNS Windows 10 (ipconfig /flushdns)

Пара простых действий для очистки всего cache DNS на Вашем компьютере

Быстрый ответ

  1. Запустите командную строку от имени администратора
  2. Введите командуipconfig /flushdns и нажмите Enter.

Подробный текст

Чтобы очистить кэш DNS необходимо выполнить следующие действия:

  1. Запустите командную строку от имени администратора (ПУСК -> набираете на клавиатуре «cmd» -> клик правой клавишей мыши -> запуск от имени Администратора)
  2. Введите простую командуipconfig /flushdns и нажмите Enter.
  3. Если всё прошло успешно, в результате вы увидите сообщение о том, что «Кэш сопоставителя DNS успешно очищен»

Помимо этого иногда бывает необходимо чтобы браузеры сбросили свой внутренний кэш DNS (да, так тоже бывает). Далее по списку:
В вашем браузере введите в адресную строку:

  • для Google Chromechrome://net-internals/#dns
  • для Яндекс Браузераbrowser://net-internals/#dns
  • для Operaopera://net-internals/#dns

На открывшейся странице вы можете посмотреть содержимое кэша DNS браузера и очистить его, нажав кнопку «Clear host cache».

Прекарсно, кэш сброшен. Приятной работы!

DNS-кэш сохраняет IP-адреса посещенных сайтов на локальном компьютере, чтобы в следующий раз загружать их быстрее.

Если у вас регулярно возникает ошибка 404, то вам может помочь очистка DNS-кэша. Например, вы перенесли сайт на другой сервер и у сайта изменился IP-адрес. Чтобы браузер открывал сайт с нового IP-адреса, необходимо удалить закэшированный IP из DNS-кэша.

Как очистить DNS-кэш в операционной системе

Очистить DNS-кэш в операционных системах не трудно — нужно всего лишь ввести одну команду через консоль.

Windows 10, 11

  1. Откройте меню Пуск и в строке поиска введите cmd. Найдется пункт Командная строка (cmd.exe). Кликните на него правой кнопкой мыши и выберите пункт Запуск от имени администратора.
  2. В открывшемся окне введите команду ipconfig/flushdns и нажмите Enter. Готово!
Очистка DNS-кэша в командной строке Windows

Ubuntu

  1. Найжмите сочетание клавиш ctrl+alt+T. Откроется Терминал. Его также можно найти в списке приложений..
  2. Введите команду sudo systemd-resolve —flush-caches, а затем укажите пароль администратора. Готово!
Очистка DNS-кэша через Терминал Ubuntu

macOS 10.14 Mojave

  1. Нажмите на иконку поиска в правом верхнем углу и найдите в поиске Терминал.
  2. В Терминале введите команду sudo killall -HUP mDNSResponder; sleep 2; а затем укажите пароль администратора. Готово!
Очистка DNS-кэша через Терминал macOS

Как очистить DNS-кэш в браузере

У современных браузеров есть свой DNS-клиент, который тоже кэширует IP-адреса. После очистки кэша в системе рекомендуем дополнительно очистить DNS-кэш в браузере.

Google Chrome, Opera, Яндекс.Браузер, Vivaldi

Этот способ подходит для очистки DNS-кэша в браузерах, основанных на Chromium.

  1. В строке браузера введите адрес chrome://net-internals/#dns. В открывшемся окне нажмите кнопку Clear host cache.
  2. В том же окне нажмите на пункт Sockets и нажмите Flush socket pools. Готово!
Окно очистки DNS-кэша Google Chrome

Mozilla Firefox

  1. Откройте меню и выберите пункт Настройки.
  2. Откройте раздел Приватность и защита и найдите пункт Куки и данные сайтов.
  3. Нажмите кнопку Удалить данные. Откроется новое окно, в нем нужно снять галочку напротив пункта Куки и данные сайтов и нажать кнопку Удалить.
  4. Готово! Можно закрывать окно с настройками.

Окно очистки Firefox

Если этот метод не сработал, то очистите DNS-кэш через окно тонких настроек браузера.

  1. Откройте страницу about:config и нажмите кнопку Я принимаю на себя риск.
  2. В поле поиска введите network.dnsCacheExpiration. Измените найденное значение на 0, нажмите ОК, а затем снова верните его на 60.
  3. Затем в поле поиска найдите значение network.dnsCacheEntries и после, как и с прошлым пунктом, измените его значение на 0, нажмите ОК и снова верните значение на 60.
  4. Готово!
Очистка DNS-кэша в Mozilla Firefox

Окно тонких настроек Firefox

Если вам понравилась статья, то подписывайтесь на наш телеграм-канал, чтобы не пропустить другие полезные материалы.

Управляйте DNS и веб-сервером с ispmanager!

Ispmanager — панель управления сайтами, веб-сервером и сервисами на нём. Подходит для хостинга на Linux и делает администрирование проще.

  1. Управление сервером без консоли, в простом интерфейсе.
  2. DNS-сервер.
  3. Автоустановщик CMS и веб-приложений.
  4. Мощный файловые менеджер.
  5. Установка различных видов СУБД SQL на один сервер.
  6. Поддержка мультиверсионности PHP.

Скачайте бесплатную пробную версию и попробуйте сами!

Попробовать ispmanager

DNS cache is crucial in speeding up internet access and improving browsing experiences by storing recent domain name lookups and their corresponding IP addresses.

Clearing this cache periodically can enhance your browsing speed and resolve connectivity issues.

Modern operating systems generally cache DNS lookup results and IP addresses to process requests more quickly. Whenever you write a URL in your browser, it sends a request to the DNS servers to “locate” the site. But instead of sending that request every single time, the browser often caches the information. This way, the next time you type in that address, the browser looks it up through the DNS cache, allowing it to return the results much faster.

However, cached DNS records can become outdated or corrupted over time, potentially leading to browsing issues, including connection errors or the display of outdated website versions. Flushing your DNS cache occasionally is a good practice to ensure you’re accessing up-to-date versions of websites and protecting yourself from security risks like DNS spoofing.

In this article we will explain how to flush the DNS cache on different operating systems, including Windows, macOS, and Linux, as well as detailing the several reasons why it is so important to flush the DNS regularly.

How to Flush DNS on Different Operating Systems

How to Flush DNS on Windows 10 & 11

If you’re using Windows 10 or 11, here are the steps you can follow to flush the DNS cache:

  1. Click on Start, then search for Command Prompt. Right-click it and select “Run as Administrator.”
  2. Once the Command Prompt is open, type ipconfig /flushdns and press Enter.
  3. A message will appear confirming that the DNS Resolver Cache was flushed.
Flush dns cache in Windows computer

In addition to flushing the DNS, performing an IP release and renewal can help resolve network connection problems. Here’s how to do it:

How to Perform an IP Release, Renew, and DNS Flush on Windows

  1. Open Command Prompt with administrative privileges.
  2. Type ipconfig /release and press Enter to release the current IP address.
  3. Next, type ipconfig /renew to obtain a new IP address.
  4. Finally, type ipconfig /flushdns to clear the DNS cache.

How to Flush DNS on macOS

Flushing the DNS cache on macOS involves using the Terminal app. Follow these steps:

  1. Press cmd + space to open Spotlight Search.
  2. Type Terminal and open the application (you can also find it in the Other section in the Launchpad).
  3. Type the following command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
  4. Enter your administrator password when prompted. Once you do, you will receive confirmation that the DNS cache has been flushed.

Note: The command can vary depending on your macOS version. Here’s how to check your macOS version:

  1. Click on the Apple menu in the upper-left corner of your screen.
  2. Select About This Mac.

Depending on your macOS version, use the appropriate command:

  • Monterey, Big Sur, Catalina: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • Mojave, High Sierra, Sierra, El Capitan, Mavericks, Mountain Lion, Lion: sudo killall -HUP mDNSResponder

How to Flush DNS on Linux

If you’re using a Linux distro such as Ubuntu, here’s how to flush the DNS cache:

  1. Open the terminal by pressing Ctrl + Alt + T or searching for “Terminal” in the Activities menu.
  2. Run the following command:
    • If you are running Ubuntu 20.04 LTS or older, use: sudo systemd-resolve --flush-caches.
    • If you are running Ubuntu 22.04 LTS or newer, use: sudo resolvectl flush-caches.
  3. Enter your administrator password when prompted, and the DNS cache will be flushed.
Flush DNS cache Linux

How to Flush DNS Cache in Google Chrome

If you experience issues accessing websites on Google Chrome, your browser’s DNS cache may also need to be flushed. Here’s how to do it:

  1. Type chrome://net-internals/#dns in the address bar and press Enter.
  2. Click the Clear Host Cache button to flush the browser’s DNS cache.

This action will ensure that Chrome fetches fresh DNS data from the websites you visit.

Why Should You Flush Your DNS Cache?

There are several reasons why flushing the DNS cache periodically is important:

Resolve DNS Errors

If you’re encountering issues such as DNS_PROBE_FINISHED_NXDOMAIN or CONNECTION_TIMED_OUT, flushing the DNS cache may help resolve the problem. These errors often arise due to outdated or incorrect DNS information.

Speed Up DNS Propagation

After making changes to your DNS records, such as transferring a domain to a new hosting provider, DNS propagation can take time to fully update across the internet. Flushing your DNS cache ensures that your device picks up these changes more quickly, allowing you to see the updates sooner.

Prevent DNS Spoofing

DNS spoofing (or poisoning) occurs when an attacker manipulates DNS cache entries to redirect users to fraudulent or malicious websites. Flushing your DNS cache helps mitigate this risk by clearing any potentially corrupted entries.

Avoiding 404 Errors

A 404 error might indicate that your system is pulling up an outdated version of a website. Flushing the DNS cache ensures that your browser accesses the most current version of the site, which can help you avoid such errors.

Remove Old DNS Data

When you change DNS providers, such as switching to Google DNS or OpenDNS, it’s important to flush your DNS cache. This ensures that your system doesn’t use outdated data from the previous provider, helping to prevent connectivity issues.

After Action Report – Flush Your DNS Cache Periodically

Flushing your DNS cache is a simple yet effective way to resolve connectivity issues, speed up website access, and prevent security risks like DNS spoofing. Whether you’re using Windows, macOS, Linux, or even just browsing on Google Chrome, clearing your DNS cache periodically is a good habit to ensure optimal performance.

Do you regularly flush your DNS cache? Let us know if you have any tips or questions! Join the conversation below by leaving a comment! 💬

Wrapping Up

RunCloud is a powerful and easy-to-use platform that helps you manage your websites on any cloud server. With RunCloud, you don’t need to be a Linux expert to set up, secure, and optimize your web applications. You can do everything from a simple and intuitive dashboard, saving you time and hassle.

RunCloud supports various web servers, PHP versions, databases, and frameworks. You can also monitor your server performance, back up your data, and automate your tasks with RunCloud. Whether you are a developer, a freelancer, or a business owner, RunCloud can help you run your websites faster and smoother.

What are you waiting for? Join RunCloud today and enjoy the best web hosting solution for your websites. It’s free for 7 days, no strings attached!

Frequently Asked Questions (FAQ)

Is clearing the DNS cache safe?

Clearing the DNS cache is safe and does not affect your saved passwords, browser history, or other personal data. It removes outdated DNS information, ensuring your computer can fetch up-to-date DNS records.

How often should I flush my DNS cache?

There’s no hard rule on how often you should flush the DNS cache, but it’s a good idea to do it when you experience connection issues or DNS errors or after making changes to your network configuration (such as switching DNS providers).

Does flushing the DNS cache affect my internet speed?

Flushing the DNS cache may temporarily slow down website access on the first visit, as the DNS lookup will need to be performed again. However, once the cache is refreshed, your browser will store the new DNS records, which can speed up access to frequently visited websites.

How do I know if my DNS cache was successfully flushed?

After running the appropriate command to flush the DNS cache (such as ipconfig /flushdns on Windows), your system usually displays a message confirming that the DNS Resolver Cache was successfully flushed.

Will clearing the DNS cache fix DNS errors?

In many cases, yes. If you encounter errors like DNS_PROBE_FINISHED_NXDOMAIN or CONNECTION_TIMED_OUT, flushing the DNS cache can help resolve these problems by removing outdated or corrupted DNS entries.

Are you facing issues while surfing the internet? Does the website you are trying to reach doesn’t open? If you’re unable to access the website then the reason behind this issue might be because of the DNS server and its resolving cache.

DNS or Domain Name System is your best friend while you are online. It converts the domain name of the website you visited into IP addresses so that the machine can understand it. Suppose you visited a website, and you used its domain name for doing this. The browser will redirect you to a DNS server and it will store the IP address of the website you are visiting. Locally, inside your device, there is a record of all the IP addresses, meaning the websites you have visited. Whenever you try to re-access the website again, it will help you gather all the information faster than before.

All the IP addresses are present in the form of a cache in DNS Resolver Cache. Sometimes, when you try to access the site, instead of getting faster results, you get no result at all. Therefore, you need to flush the reset DNS resolver cache for getting the positive output. There are some common reasons which cause the DNS cache to fail over time. The website may have changed their IP address and since your records have the old records. And hence, you may have the old IP address, causing problems while you are trying to establish a connection.

Another reason is the storing of bad results in the form of a cache. Sometimes these results get saved due to DNS spoofing and poisoning, ending up in unstable online connections. Maybe the site is fine, and the problem is in the DNS cache on your device. The DNS cache can get corrupt or outdated and you may not be able to access the site. If any of this has happened, then you may need to flush and reset your DNS resolve cache for better results.

Just like DNS resolver cache, there are two other caches present on your device, which you can flush and reset if needed. These are the Memory cache and the Thumbnail cache. Memory cache comprises a cache of data from your system memory. Thumbnail cache contains the thumbnails of the images and videos on your device, it includes the thumbnails of deleted ones also. Clearing the memory cache frees some system memory. While clearing the thumbnail cache can create some free room on your hard disks.

Flush DNS

Table of Contents

There are three methods applicable for flushing your DNS resolver cache in Windows 10. These methods will fix your internet problems and help you with a stable and working connection.

Method 1: Use the Run Dialog Box

1. Open the Run dialog box using the shortcut key Windows Key + R.

2. Type ipconfig /flushdns in the box and hit the OK button or the Enter box.

Enter ipconfig flushdns in the box and hit the OK | Flush and Reset the DNS Cache

3. A cmd box will appear on the screen for a moment and will confirm that the DNS cache will get successfully cleared.

Flush DNS Cache using Command Prompt

Method 2: Using Command Prompt

If you don’t use an administrative account to login to the Windows, then make sure you have access to one or you create a new administrative account as you will require admin rights to clear the DNS cache. Else, the command line will show System 5 error and your request will get denied.

Using Command Prompt you can perform various other functions related to DNS cache and your IP address. These include viewing the current DNS cache, registering your DNS cache on host files, releasing the current IP address settings and also requesting & resetting the IP address. You can also enable or disable DNS cache with only one line of code.

1. Type cmd in Windows Search bar then click on “Run as administrator” to open the elevated Command Prompt. Remember to run the command line as an administrator for making these commands work.

Open the elevated command prompt by pressing the Windows key + S, type cmd and choose run as administrator.

2. Once the command screen appears, enter the command ipconfig /flushdns and hit the Enter key. Once you hit Enter, you will see a confirmation window appear, confirming the successful DNS cache flushing.

Flush DNS Cache using Command Prompt

3. Once done, verify if the DNS cache is cleared or not. Enter the command ipconfig /displaydns and hit the Enter key. If there are any DNS entries left, they will get displayed on the screen. Also, you can use this command anytime to check the DNS entries.

Type ipconfig displaydns

4. If you want to turn off the DNS cache, type in the command net stop dns cache in the command line and press the Enter key.

Net Stop DNS Cache using Command Prompt

5. Next, if you want to turn on the DNS cache, type the command net start dnscache in the Command Prompt and press the Enter key.

Note: If you turn off the DNS cache and forget to turn it on again, then it will automatically start after you restart your system.

Net Start DNSCache

You can use ipconfig /registerdns for registering the DNS cache present on your Hosts file. Another one is ipconfig /renew which will reset and request a new IP address. For releasing the current IP address settings, use ipconfig /release.

Method 3: Using Windows Powershell

Windows Powershell is the most powerful command line present on the Windows OS. You can do much more with PowerShell than you can do with the Command Prompt. Another advantage of Windows Powershell is you can clear client-side DNS cache while you could only clear local DNS cache in Command Prompt.

1. Open Windows Powershell using the Run dialog box or the Windows search bar.

Search for Windows Powershell in the search bar and click on Run as Administrator

2. If you want to clear the client-side cache, enter the command Clear-DnsClientCache in Powershell and hit the Enter button.

Clear-DnsClientCache | Flush and Reset the DNS Cache

3. If you want to clear just the DNS cache on your desktop, enter Clear-DnsServerCache and hit the Enter key.

Clear-DnsServerCache | Flush and Reset the DNS Cache

What if the DNS Cache is not getting cleared or flushed?

Sometimes, you may not be able to clear or reset DNS Cache using the Command Prompt, it may happen because the DNS cache is disabled. So, you need to first enable it before clearing the cache again.

1. Open the Run dialog box and enter services.msc and hit Enter.

Type services.msc in the run command box then press enter | Flush and Reset the DNS Cache

2. Search for DNS Client Service in the list and right-click on it and select Properties.

A Services Window will open, locate DNS Client service.

4. In the Properties window, switch to the General tab.

5. Set the Startup type option to Automatic, and then click on OK to confirm the changes.

go to the General tab. find a Startup type option, set it to Automatic

Now, try to clear the DNS cache and you will see that the command is running successfully. Similarly, if you want to disable the DNS cache for some reason, change the startup type to Disable.

Recommended:

  • Quickly Clear All Cache in Windows 10 [The Ultimate Guide]
  • 10 Best Public DNS Servers in 2021: Comparison & Review
  • 3 Ways to change DNS settings on Windows 10

We hope this article was helpful and you were able to flush & reset the DNS cache in Windows 10. If you still have any questions then feel free to ask them in the comment section.

Кэш DNS может быть поврежден по ряду причин, включая сетевые атаки или вирусы. Когда это происходит, сопоставление IP-адресов становится поврежденным для некоторых популярных веб-сайтов.

Например, вместо того, чтобы заходить на сайт www.google.com, ваш браузер может перенаправить вас на IP-адрес вредоносного веб-сайта, который злоумышленник вставил в записи DNS вашего компьютера. Или вы можете получить большое количество ошибок 404.

Очистка кеша DNS удаляет всю сохраненную информацию поиска DNS. Затем ваш компьютер получает обновленные данные с DNS-серверов при следующей отправке запроса на поиск.

Как очистить DNS-кэш локально в Windows, MacOS и Linux


Как очистить кэш DNS в Windows

Очистка кеша DNS — это простой и быстрый процесс. Процедура одинакова для почти всех систем Windows. Для примера ниже мы будем использовать Windows 10.

Чтобы очистить DNS на вашем компьютере с Windows:

  1. Загрузите командную строку от имени администратора. Откройте меню «Пуск» и начните вводить «командная строка» или «cmd», пока не увидите ее в результатах.
  2. Введите ipconfig/flushdns, когда командная строка загрузится, и нажмите Enter на клавиатуре.

    ipconfig/flushdns

  3. Процесс должен занять всего несколько секунд. Вы должны увидеть подтверждающее сообщение DNS Resolver Cache, когда это будет сделано:

    DNS Resolver Cache

База данных кэша DNS на вашем компьютере теперь очищена. Вы должны получить правильное и обновленное сопоставление IP-адресов с DNS-серверов в следующий раз, когда ваш компьютер отправит DNS-запрос.


Очистить кэш DNS на Mac

Есть несколько разных команд для очистки кеша DNS в OS X и macOS в зависимости от используемой версии.

Поскольку процедура одинакова для всех версий, в этой статье подробно описано, как очистить DNS в macOS Mojave (10.14), а затем перечислены команды для других версий в таблице.

Сброс DNS на MacOS Mojave (версия 10.14)

Чтобы очистить кэш DNS на MacOS Mojave, используйте приложение Terminal:

  1. Запустите Terminal.app, используя ваш предпочтительный метод. Вы можете запустить приложение из Приложения -> Утилиты или нажать Ctrl + Space, чтобы запустить Spotlight и выполнить поиск терминала.
    terminal.app

  2. Введите sudo killall -HUP mDNSResponder и нажмите Enter на клавиатуре.
  3. Введите пароль администратора для рассматриваемой учетной записи и нажмите Enter.
    sudo killall -HUP mDNSResponder

После окончания процесса не будет никаких оповещений

Команды для очистки DNS-кэша в старых версиях macOS и Mac OS X

В таблице ниже перечислены команды для очистки кэша DNS в большинстве версий MacOS и Mac OS X. Вы можете скопировать и вставить их прямо из таблицы в свой терминал.

Mac OS X или macOS версия Команда терминала
Mojave (version 10.14)
High Sierra (version 10.13)
Sierra (version 10.12)
Mountain Lion (version 10.8)
Lion (version 10.7)
sudo killall -HUP mDNSResponde
El Capitan (version 10.11)
Mavericks (version 10.9)
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
Yosemite (version 10.10) sudo discoveryutil mdnsflushcache
sudo discoveryutil udnsflushcaches
Snow Leopard (version 10.6)
Leopard (version 10.5)
sudo dscacheutil -flushcache
Tiger (version 10.4) lookupd -flushcache

Как очистить кэш DNS в Linux

Дистрибутивы Linux немного отличаются от компьютеров с Windows и Mac. Каждый дистрибутив Linux может использовать свою службу DNS. Некоторые дистрибутивы, такие как Ubuntu, вообще не имеют службы DNS по умолчанию.

Это зависит от того, какая служба используется в вашем дистрибутиве и включена ли она по умолчанию. Некоторые из них — NCSD (Name Service Caching Daemon), dnsmasq и BIND (Berkely Internet Name Domain).

Для каждого дистрибутива вам нужно запустить окно терминала. Нажмите Ctrl + Alt + T на клавиатуре и используйте соответствующую команду, чтобы очистить кэш DNS для службы, работающей в вашей системе Linux.

Очистить локальный DNS-кэш NCSD

Используйте эту команду для очистки DNS-кэша NCSD на вашем Linux-компьютере:

sudo /etc/init.d/nscd restart

Введите свой пароль, если это необходимо. Процесс останавливается, а затем запускает службу NCSD в течение нескольких секунд.

Очистить локальный DNS-кэш dnsmasq

Используйте эту команду для очистки DNS-кэша dnsmasq на вашем Linux-компьютере:

sudo /etc/init.d/dnsmasq restart

Введите пароль еще раз, если терминал попросит вас. Вы увидите ответ, когда служба останавится и запустится снова.

Очистить локальный DNS-кэш BIND

Если вы используете BIND для службы DNS, есть несколько команд, которые вы можете использовать для очистки его кеша DNS. Вам может потребоваться ввести пароль для завершения процесса.

sudo /etc/init.d/named restart
sudo rndc restart
sudo rndc exec	

Примечание: BIND также позволяет указывать конкретные домены при выполнении сброса DNS. Просто добавьте flushname и имя домена в команду sudo rndc. Например:sudo rndc flushname wiki.merionet.ru

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как поменять windows 10 pro на домашнюю
  • Эмуляция линукс на windows
  • Сброс настроек встроенный в параметры windows 10
  • Настройка домена windows server 2003
  • Windows не удалось установить android