Cookies are small files your browser stores so websites remember you

A cookie is a tiny text file that a website asks your browser to save. When you return to that site, your browser sends the cookie back, and the site knows it's you — or at least knows you've been there before. Cookies let websites remember your login, your shopping cart, your language preference, or what you've read.

Most browsers accept cookies by default, but some people turn them off for privacy reasons. If a website isn't working right — you can't stay logged in, pages look broken, or you see a message asking you to enable cookies — you may need to turn them back on. The steps differ slightly depending on which browser you use.

Key Takeaways

  • Cookies are files websites ask your browser to store so they can recognize you when you return.
  • Most browsers allow cookies automatically, but you can turn them on or off in your browser settings.
  • If a website asks you to enable cookies, you'll find the setting under Privacy, Security, or Settings — the exact location depends on your browser.
  • You can allow all cookies, block third-party cookies only, or delete cookies regularly without turning them off entirely.
  • Turning cookies on for one site doesn't affect your settings for other sites.

Enable cookies in Chrome

Open Chrome and click the three vertical dots in the top right corner. Select Settings, then click Privacy and security in the left menu. Click Cookies and other site data.

You'll see three options. If you want cookies to work everywhere, select Allow all cookies. If you want to block only third-party cookies (ads and trackers from other sites), select Block third-party cookies. If you want to block all cookies but allow them for specific sites, select Block all cookies, then scroll down and add the site to the Sites that can always use cookies list.

Close the settings tab. The change takes effect immediately.

Enable cookies in Firefox

Open Firefox and click the three horizontal lines in the top right corner. Select Settings, then click Privacy & Security in the left menu. Under Cookies and Site Data, make sure the checkbox next to Cookies and site data is checked.

Below that, you'll see three radio button options. Select Allow cookies and site data to accept all cookies. If you want to block only third-party cookies, select Allow cookies and site data but then check the box for Only from sites you visit. Close the settings tab — your change is saved automatically.

Enable cookies in Safari

Open Safari and click Safari in the top menu bar. Select Settings (or Preferences on older versions). Click the Privacy tab.

Under Cookies and website data, select Allow from websites I visit. This blocks cookies from sites you haven't visited directly (third-party cookies) but allows cookies from the sites you're actually using. If you want to allow all cookies, select Always allow. Close the window — the change is saved automatically.

Enable cookies in Edge

Open Edge and click the three dots in the top right corner. Select Settings, then click Privacy, search, and services in the left menu. Under Cookies and other site data, toggle the switch next to Cookies and other site data to On.

Below that, you'll see options for which cookies to allow. Select Allow all cookies to accept everything, or select Block only third-party cookies to allow cookies from sites you visit but block tracking cookies. Close the settings — your change takes effect immediately.

Allow cookies for a single website

If you want to block cookies everywhere but allow them for one specific site, you can add that site to an exception list instead of changing your global settings.

In Chrome: Go to Settings > Privacy and security > Cookies and other site data. Scroll to Sites that can always use cookies and click Add. Type the website address and click Add.

In Firefox: Go to Settings > Privacy & Security > Cookies and Site Data. Click Manage Exceptions. Type the website address in the box labeled Address of website and click Allow.

In Safari: There is no per-site exception list. You must change the global setting or use Safari's private browsing mode, which blocks all cookies by default.

In Edge: Go to Settings > Privacy, search, and services > Cookies and other site data. Scroll to Allow and click Add. Type the website address and click Add.

Clear old cookies without turning them off

If you want to keep cookies turned on but delete the ones you've already accumulated, you can clear them without changing your settings. This removes old tracking data while still letting websites recognize you on your next visit.

In Chrome: Click the three dots > More tools > Clear browsing data. Make sure Cookies and other site data is checked, set the time range to All time, and click Clear data.

In Firefox: Click the three lines > Settings > Privacy & Security. Under Cookies and Site Data, click Clear Data. Check Cookies and Site Data and click Clear.

In Safari: Click Safari in the menu bar > Settings > Privacy. Click Manage Website Data, select the sites you want to remove, and click Remove. Or click Remove All to delete everything.

In Edge: Click the three dots > Settings > Privacy, search, and services. Under Clear browsing data, click Choose what to clear. Check Cookies and other site data, set the time range to All time, and click Clear now.

Frequently Asked Questions

Will turning on cookies make my browser less secure?

Cookies themselves are not dangerous — they're just text files. The real risk is that advertisers and trackers use cookies to follow you across the web. If security is your concern, you can allow cookies from sites you visit while blocking third-party cookies, which stops most tracking without breaking website functionality.

What's the difference between first-party and third-party cookies?

A first-party cookie comes from the website you're visiting. A third-party cookie comes from an ad network or tracker that the website has embedded. Third-party cookies are how advertisers follow you from site to site. Blocking only third-party cookies is a middle ground: websites still work, but you're harder to track.

Do I need to restart my browser after enabling cookies?

No. Cookie settings take effect immediately in all modern browsers. You don't need to close and reopen your browser, though you may need to refresh the page you're on if it was already open when you changed the setting.

Can a website force me to turn on cookies?

A website can display a message asking you to enable cookies, but it cannot force you. If a site doesn't work without cookies, you have to choose between enabling them for that site or not using the site. Some sites genuinely need cookies to function (like email or banking), while others just want them for tracking.

If I clear my cookies, will I have to log in to everything again?

Yes. Login cookies are how websites remember that you're signed in. When you clear cookies, you clear those login files too, so you'll need to sign back in to sites that require it. This is why many people clear cookies only occasionally rather than every time they browse.