What browser have you tried, & have you tried other browsers (Opera, Firefox, Edge, IE, Safari, Chrome, etc.)?
What error message do you get when you try to connect?
Does this only happen over WiFi, or are you also unable to connect when connected by Ethernet cable directly to your router?
If this is a laptop, does it only happen on certain WiFi connections, or all of them?
Finally, are there any other devices using the same WiFi signal that are able to connect to those sites?