Where Safari stores your browsing history

Safari keeps a record of every website you visit in a single location. On Mac, open Safari and press Command + Y to open the History window. On iPhone or iPad, tap the Bookmarks icon at the bottom of the screen (it looks like an open book), then tap the History tab. Your browsing history appears in reverse chronological order — the most recent sites at the top.

The history window shows the date and time you visited each site. You can search for a specific website by typing its name in the search box at the top of the History window on Mac, or by scrolling through the list on iPhone and iPad. Safari organizes older history into folders by date: "Earlier Today," "Yesterday," "This Week," and "Last Week."

Key Takeaways

  • Press Command + Y on Mac or tap the Bookmarks icon on iPhone and iPad to open your browsing history in Safari.
  • Safari stores history for the past 30 days by default, though you can change this setting to keep it longer or shorter.
  • You can delete individual sites from history or clear all history at once using the History menu on Mac or Settings on iPhone and iPad.
  • Private Browsing mode prevents Safari from recording sites you visit, useful when you do not want those visits saved to your history.

How to change how long Safari keeps your history

By default, Safari saves your browsing history for 30 days. You can adjust this to keep history for a longer or shorter period. On Mac, open Safari, then go to Safari menu > Settings > General. Look for the dropdown that says "Remove history items" and choose your preferred timeframe: one day, one week, two weeks, one month, or manually.

On iPhone or iPad, go to Settings > Safari > Clear History and Website Data. This menu does not show the retention period directly, but you can set Safari to clear history automatically by choosing "On Exit" — this deletes your history every time you close the app. If you want to keep history longer than 30 days, Safari does not offer a built-in option; you would need to avoid clearing history manually.

Deleting specific sites from your history

If you want to remove one or two websites from your history without clearing everything, you can delete them individually on Mac. Open the History window with Command + Y, find the site you want to remove, right-click on it, and select "Delete." The site disappears from your history when ready.

On iPhone and iPad, individual deletion is not available in the same way. Instead, you can only clear all history at once or use Private Browsing mode to prevent future visits from being recorded. If you need to hide a single visit on iPhone or iPad, your only option is to clear all history and website data, which removes everything from your history at once.

Clearing all your Safari history at once

On Mac, go to History menu > Clear History. A window appears asking how much history you want to clear: "the last hour," "today," "today and yesterday," or "all history." Choose your timeframe and click Clear History. This removes browsing history, cookies, and cached website data all at once.

On iPhone or iPad, go to Settings > Safari > Clear History and Website Data. A confirmation message appears. Tap "Clear History and Data" to confirm. This removes your browsing history, cookies, and cached data from Safari. Unlike Mac, you cannot choose a specific timeframe — it clears everything when you tap the button.

Using Private Browsing to avoid recording history

Private Browsing mode prevents Safari from saving any record of the sites you visit. On Mac, go to File > New Private Window, or press Command + Shift + N. Any site you visit in a private window does not appear in your history, and Safari does not store cookies or cached data from those visits.

On iPhone or iPad, tap the Tabs icon at the bottom right (it shows a number), then tap "Private" at the bottom of the screen. Switch to a private tab to browse without recording history. You can have both regular and private tabs open at the same time — regular tabs record history as usual, while private tabs do not. When you close a private tab, Safari forgets everything from that session.

Searching your history for a specific website

If you remember visiting a site but cannot find it in your history list, use the search function. On Mac, open History with Command + Y and type the website name or part of the URL in the search box at the top. Safari filters the history to show only matching sites. You can search by the site name, the page title, or the URL.

On iPhone and iPad, open the History tab in the Bookmarks menu and scroll through the date folders. Unfortunately, there is no search box in the iPhone and iPad history view, so you have to browse manually. If you visit a site frequently, it may also appear in your Bookmarks or in the Frequently Visited section on your Safari start page, which can be faster than searching history.

Recovering deleted history

Once you delete history from Safari, it cannot be recovered through Safari itself. Safari does not have an undo function for history deletion. However, if you use iCloud to sync Safari across devices, clearing history on one device clears it on all devices connected to the same iCloud account.

If you need to recover deleted history, your only option is to check if your internet service provider or network router keeps logs of websites visited on your network. Most home routers do not store this information by default, and accessing router logs requires technical knowledge. For most users, deleted Safari history is permanent.

Frequently Asked Questions

Does Safari history sync across my devices?

Yes, if you are signed into the same iCloud account on multiple Apple devices and have Safari enabled in iCloud settings. Your history, bookmarks, and open tabs sync automatically. If you clear history on one device, it clears on all devices using that iCloud account. You can turn off syncing in Settings > [Your Name] > iCloud > Safari if you want history to stay separate on each device.

Can I see what websites someone else visited on my Mac?

Yes, if they used Safari on your computer. Their history appears in the History window unless they used Private Browsing mode. If you share a Mac with other users, each person has their own user account with separate Safari history. You can only see history from accounts you have access to. To prevent others from seeing your history, use Private Browsing or create a separate user account.

Why does a website I visited not appear in my history?

The site may have been visited in a Private Browsing window, which does not record history. It could also be older than your history retention setting — if you keep history for 30 days and the visit was 40 days ago, it no longer appears. Some websites may also block Safari from recording the visit, though this is uncommon. Check your history retention setting in Safari preferences to confirm how far back your history goes.

Can I export my Safari history to a file?

Safari does not have a built-in export function for history. On Mac, you can use third-party tools or scripts to extract history data, but this requires technical knowledge. For most users, the easiest way to keep a record of important sites is to bookmark them instead of relying on history. Bookmarks are easier to organize, search, and back up than history.