This is weird but I followed the steps to setup static IP using DHCP.
My dhcpcd.conf file:
interface wlan0 static ip_address=192.168.0.100/24 static routers=188.8.131.52 static domain_name_servers=184.108.40.206
Rebooted and i could access google, search on it but a few websites are not able to open for some reason. For example, i could open facebook. But not github or stackexchange. No idea why. When wlan0 DHCP automatic, all websites able to open fine.
Anybody knows why and how to solve it?
EDIT: Thanks for responding to my question. So here is what I tried:
Based on answer shared https://raspberrypi.stackexchange.com/a/74428/133085 - using "request 192.168.0.100" in dhcpcd.conf, it resulted in Auto DHCP instead. that means my router is rejecting this IP for some reason.
The thing is, I COULD set a static IP address of 192.168.0.110 (or any other number) on my Mac. So I know my router do accept static IP settings. Just on my rasp pi seems to be having this issue.
Also just to add the error I get from browser is:
This site can’t be reachedhttps://raspberrypi.stackexchange.com/ is unreachable. ERR_ADDRESS_UNREACHABLE