Settings are displayed. Click Wi-Fi.
Wi-Fi settings are displayed. Click the small 'i' at the extreme right of the Wi-Fi network you are connected to (For example, airtel.)
On the Wi-Fi page, slide the toggle to restart Wi-Fi.
Once the Wi-Fi restarts, your Wi-Fi network starts appearing again and changes have taken effect.
Go back to Safari and try browsing the same websites that were giving the error earlier. You will find that you are now able to browse those websites successfully.
Do let us know in the comments section if the above resolution works for you.
Front and back panel images of iPhone 8 leaked
Apple iPhone 8 might include the mega feature that Samsung S8 skipped
Pictures showing metal frame of iPhone 8 leaked