Control which windows Safari reopens on Mac
Each time Safari opens, it can reopen windows and tabs from the last session, or it can reopen one or more other windows or tabs.
Choose whether to reopen windows in Safari
When Safari opens, it might automatically restore the same windows or tabs that were open when you last quit Safari. If you want to change this behavior, take either of these steps:
To prevent windows from reopening the next time you open Safari, press and hold the Shift key while opening Safari.
To prevent windows from reopening every time you open Safari, use the system setting “Close windows when quitting an application”.
After you configure the system setting, check Safari settings as well:
From the menu bar in Safari, choose Safari > Settings (or Preferences).
In the General pane, choose a setting from the “Safari opens with” menu.
If you set Safari to open with a new window, use the “New windows open with” menu to define which window or tabs Safari should reopen.
If Safari reopens unwanted windows
After checking your settings, if Safari keeps reopening one or more unwanted windows or tabs, or keeps changing the search engine, a phishing site may have tricked you into installing unknown or suspicious software. If you think you might have malware or adware on your Mac:
Update macOS on your Mac. If it's already up to date, restart your Mac. macOS includes a built-in tool that removes known malware when you restart.
Remove any unknown or suspicious apps and Safari extensions.
Remove any unknown or suspicious system configuration profiles, even if the profile doesn't seem related to the unwanted windows. To remove a profile, select it in System Settings, click the remove button (–) below the list of profiles, then restart your Mac. However, if your Mac belongs to a school or other organization, check with its system administrator before removing a necessary profile. To find profiles in System Settings:
macOS Sequoia 15 or later: Choose Apple menu > System Settings, click General in the sidebar, then click Device Management on the right.
macOS Ventura 13 or later: Choose Apple menu > System Settings, click Privacy & Security in the sidebar, then scroll down and click Profiles on the right.
Earlier versions of macOS: Choose Apple menu > System Preferences, then click Profiles.