Sometimes the problem resolves on its own. If it persists for longer than a day or so, and you otherwise have no trouble accessing the Internet, then please test after taking each of the steps below that you haven't already tried. Back up all data before making any changes.
Step 1
From the Safari menu bar, select
Safari ▹ Preferences ▹ Security
and uncheck the box marked
Warn when visiting a fraudulent website
Then check the box again. Wait a minute or so and test.
Step 2
Restart the computer in safe mode. Certain caches maintained by the system will be rebuilt.
Safe mode is much slower to start up than normal. The next normal startup may also be somewhat slow.
When the login screen appears, restart as usual (not in safe mode) and test. There's no need to log in while in safe mode.
Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t start in safe mode. In that case, ask for instructions.
Step 3
Triple-click anywhere in the line of text below on this page to select it:
open $TMPDIR..
Copy the selected text to the Clipboard by pressing the key combination command-C.
Launch the built-in Terminal application in any one of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad and start typing the name.
Paste into the Terminal window by pressing command-V. Depending on which web browser you use, you may have to press the return key. A folder with a long, random name should open. Inside it, there should be a subfolder named "C". Drag that to the Trash.
Log out or restart the computer. Empty the Trash.