3 min read Updated August 17, 2026

Fix “Cookie missing domain, defaulted to localhost”

Cookie missing domain, defaulted to localhost (and the header variant Header string format has no domain info; defaulted to localhost) means the source format cannot carry a host. Paste the header below, then edit domain in the JSON output before you import.

Importing unchanged writes cookies for localhost. They will not be sent to example.com.

Cookie missing domaindefaulted to localhostcookie domain localhostHeader string no domain
  1. 1
    Paste the header or map

    You will see the localhost warning. That is the detector working, not a crash.

  2. 2
    Rewrite domains in JSON

    Output is JSON Array. Change "domain": "localhost" to the API host, with a leading dot if subdomains should receive the cookie. Set hostOnly accordingly.

  3. 3
    Import on that origin

    Open the matching site in Chrome, CookieMan Import, Apply. Or export Netscape after the domain edit for curl.

Cookies are credentials. Conversion stays in this page — delete the file when you are done.

Message → cause → fix

MessageCauseFix
Header string format has no domain info; defaulted to localhostCookie request headerEdit domain in JSON; prefer Set-Cookie if you have it
Cookie "name" from map has no domain, defaulted to localhostJSON map of stringsUse JSON Array from CookieMan instead of a map
Cookie "name" missing domain, defaulted to localhostJSON object without domainAdd domain on the object
The converter will not guess example.com. Guessing would write cookies onto the wrong host. The warning is the product behaving correctly.

Minimal JSON after you fix the host

            [
  {
    "name": "session_id",
    "value": "abc123",
    "domain": ".example.com",
    "path": "/",
    "hostOnly": false,
    "secure": true,
    "httpOnly": true,
    "sameSite": "lax"
  }
]
          

Questions people ask

Why not default domain to the current tab?
This page has no current tab. The extension Import still uses the domains in the file; it does not rewrite them to the active origin automatically.
Should I use example.com or .example.com?
A leading dot (and hostOnly: false) shares the cookie with subdomains. Host-only cookies omit the Domain attribute in the browser and should stay without a leading dot plus hostOnly: true.
Will Netscape export still say localhost if I forget to edit?
Yes. curl will send those cookies only to localhost. That is why the warning exists.
3 min read

JSON Map vs JSON Array Cookie Export

A JSON map is name→value only. CookieMan fills domain=localhost, path=/, session=true and warns. Use JSON Array when you need to import into Chrome.

JSON map cookiesJSON array vs map Open the guide
3 min read

Cookie Header vs Set-Cookie Conversion

A Cookie request header is name=value pairs. Set-Cookie response lines carry Domain, Path, flags and Expires. Convert each separately — they are not interchangeable.

Cookie vs Set-CookieSet-Cookie to JSON Open the guide
3 min read

Postman Cookie Header to JSON

Paste a Postman Cookie header and turn name=value pairs into a JSON array. Domains default to localhost until you set them — then import or send via curl.

Postman cookiesPostman Cookie header Open the guide

Apply this on live cookies

The converter rewrites files. The extension reads and writes the jar in Chrome, including HttpOnly cookies.

Free and MIT-licensed · Chrome, Edge and other Chromium browsers · Nothing leaves your machine