Whether it's hackers trying to steal private data, a government determined to snoop on everything you we do online, or large companies tracking us around the internet in order to sell us stuff, it seems there's more reason than ever to protect our privacy online.

Thankfully, macOS has plenty of tools to help us do just that, and there are plenty of steps you can take and third-party applications you can use to make sure your private data stays private. As ever, many of the things you can do are straightforward and, dare we say it, common sense, but they bear repeating because so many people don't take the necessary action.

In this article we offer simple but comprehensive advice on protecting your privacy online when using a Mac. Read next: How to protect your privacy on iPhone

Use a password manager, or at least Safari's password tools

Apple's Safari browser allows you to store passwords and auto-fill them when it detects you have arrived at a site for which it has a password. It also allows you to view stored user names and passwords by going to Preferences and clicking the Passwords tab, and Safari can also suggest secure passwords for you.

How to protect privacy on a Mac: Password manager

In other words, there's no excuse for creating passwords that can be easily guessed just because you don't want to forget them. Likewise, using the same password for multiple sites and writing passwords down on Post-it notes.

For even greater security, use a password manager like 1Password or LastPass. In addition to suggesting, storing and auto-filling passwords, these apps can store credit card details, licence codes and anything else you need to keep secure. And they're encrypted with military-level encryption.

We also cover how to stop Safari asking to use your location data here.

Use Safari's privacy settings

Safari allows you to specify if and how websites you visit store cookies and other data on your Mac. To specify your preference, go to Safari > Preferences and click the Privacy tab then choose one of the four options.

How to protect privacy on a Mac: Safari privacy settings

From here, you can also specify how websites obtain permission to use Location Services, or deny permission altogether. And you can ask websites not to track you (although not all sites comply with the request) and specify whether websites can check whether you have set up Apple Pay.

Private Browsing

If you're using Safari to browse for something particularly sensitive, such as a gift for a loved one or a new job, you can open a Private Window from the File menu, using the Private Browsing feature.

How to protect privacy on a Mac: Private Browsing

When you're working in this window, none of the sites you visit will be stored in History and auto-fill won't work. Tabs within the window won't be stored in iCloud and cookies will be deleted when you close the window.

Google's Chrome has a similar mode called Incognito.

We have lots more Safari tips here: How to use the Safari web browser on the Mac. And take a look at 5 useful reasons to turn on private mode in your browser

Disable Spotlight Suggestions

The Suggestions feature in Spotlight is very useful, but in order to work, it sends your search query, as well as the suggestions you select and 'related usage data' to Apple. If you're worried about that, open System Preferences and click Spotlight (on the top row). Now select the Search Results tab, and untick Spotlight Suggestions.

How to protect privacy on Mac: Spotlight suggestions

Use DuckDuckGo

DuckDuckGo is a search engine that promises, unlike Google, not to track you. That means when you use DuckDuckGo to search for ideas for a gift for a loved one, you won't be bombarded with adverts for those gifts whenever you visit a website that hosts Google or Bing adverts.

How to protect privacy on a Mac: DuckDuckGo

To make DuckDuckGo the default search engine for Safari, got to Safari > Preferences and click the Search tab. Click the Search Engine menu and choose DuckDuckGo.

Read more: Best Mac tips, tricks and timesavers

Keep macOS updated

Apple does its best to keep on top of the latest online threats and exploits and issues patches for them as quickly as it can. In order for those patches to be effective, you need to install them!

Security patches are issued in the form of updates to macOS. So whenever you're prompted to install an update, do it.

If you're unsure whether your Mac is running the most up-to-date version of its operating system, go to the Apple menu in the Finder, click About This Mac and then click Software Update. If there's an update available, you'll be taken to the Mac App Store Updates section to download and install it.

Read more: How to update a Mac with the latest macOS software

Review Privacy Settings

Go to System Preferences > Security & Privacy and click on the Privacy tab. Starting with Location Services, review the applications that have access to the data on your Mac.

How to protect privacy on a Mac: Privacy Settings

For example, clicking on Location Services will show you all the applications that have access to your location, while Contacts displays the applications that can view and use your contacts data. If there are any applications you don't want to access data, untick the box next to them.

We have more tips on how to use System Preferences here: How to use System Preferences in macOS (and Mac OS X)

Make sure Firewall is on

Also in Security & Privacy Settings, click on the Firewall tab and make sure the Firewall is on. If it's not, click the padlock at the bottom of the dialog box, type in your password and click Turn On Firewall. This prevents unauthorised applications and services from accepting incoming connections.

How to protect privacy on a Mac: Turn on firewall

Click Firewall Options to see which applications and services are allowed to accept incoming connections. On this screen you can also enable Stealth Mode, which stops applications 'pinging' your Mac on a network to see if it's there.

Read more: 22 best Mac security tips and tricks

Uninstall Flash Player

Flash Player becomes less relevant with every passing year. But it's still a favourite for hackers. Unless you really need it and are prepared to update it every time a new version becomes available, uninstall it.

Read more: How to uninstall Flash Player

Review your Facebook privacy settings

Most of us set our Facebook privacy preferences once and then forget about them. But Facebook's policies change so often that it's worthwhile checking regularly to see who can access your profile, your photos, your posts and everything else about you that's visible on Facebook.

Social media is used by everyone from law enforcement and potential employers to those who are just nosy, and it's up to you to make sure you control how much they are able to find out about you. On your Mac, go to facebook.com/settings and click on Privacy on the right hand sidebar. Review your current settings and change them as necessary.