Safari also keeps a DNS cache of its own, and it is separate from the DNS cache stored by your operating system.
If you use Safari as your main browser, then you’ll need to clear Safari’s DNS cache as well.
Within Safari click Command+
Navigate to the Advanced Tab.
Check the Show Develop menu in menu bar option.
Now you should have a new Develop option in your menu bar. Select Develop, then Empty Caches.
Your DNS should now be cleared.