You can remove all records that macOS Sierra’s Safari keeps of where you’ve browsed during a period of time you want. If your Mac and your other devices have Safari turned on in iCloud preferences, your browsing history is removed from all of them.
Clearing your browsing history in Safari doesn’t clear any browsing histories kept independently by websites you visited. Choose History > Clear History, click the pop-up menu, then choose how far back you want your browsing history cleared.
When you clear your history, Safari removes all the data it saves as a result of your browsing, including the history of webpages you visited, the back and forward list for open webpages, Top Sites that aren’t marked as permanent, your frequently visited site list, recent searches, and more. So make sure you really want to remove all this data before you clear your Safari history.