When a computer needs to do a DNS lookup it will first look in its internal cache. If the computer is not refreshing its DNS cache in a timely manner, you may need to manually clear the DNS information.
To clear the cache on MacOS you must first open a command terminal window. To do that first start a search by either clicking on the search icon of the OS or pressing CMD + the spacebar on your keyboard. Then type in terminal and hit enter. Once you have the terminal open, the command you will run depends on what version of MacOS you are running. To find your MacOS version, click the Apple in the top left corner and then click About This Mac.
Versions 10.7 (Lion), 10.8 (Mountain Lion), 10.12 (Sierra), 10.13 (High Sierra), and 10.14 (Mojave)
sudo killall -HUP mDNSResponder
Versions 10.10 (Yosemite)
sudo discoveryutil mdnsflushcache
Versions 10.9 (Mavericks), 10.11 (El Capitan)
sudo dscacheutil -flushcache sudo killall -HUP mDNSResponder