If you've come across this article, chances are you're trying to fix an issue that is preventing your iPhone from effectively connecting to a new WiFi network or to a network that previously worked but on which you have made some configuration changes (router change , DNS change, gateway IP address change, etc.).
In most cases, these problems are due to the persistence of the DNS cache within the memory of the iPhone itself, which cause the inability to connect to websites and the appearance of error messages from apps that need access to internet like the one in the following screenshot (taken from the Ookla SpeedTest app, which we talked about here):
In the following paragraphs we will describe two methods that can be used to clear this cache and hopefully restore the connection.
Method #1: Airplane mode
The first method that we recommend you try is to activate and deactivate the airplane mode, selecting and deselecting the icon with the airplane present at the top of the iPhone. This operation will result in the deletion of the DNS cache on the iPhone: consequently, all changes made in our WiFi's network settings will take effect immediately without further action.
Method #2: Reset network settings
In case airplane mode isn't enough to solve your problem, you can try the "reset network settings" feature as follows:
- Open the Settings app on the iPhone
- Open the General tab and from there select Reset
- Select the Reset Network Settings option
- Click on Confirm in the security popup that appears
Once you click on Confirm, the device will restart automatically. When the reboot is complete, the DNS cache will have been cleared: you can then configure your WiFi network again and connect to the network.
Conclusion
That's it for now: we hope this simple guide will help you solve this type of problem related to your iPhone being unable to connect to your WiFi network. See you next time!