I've started using spotlight with webpages today. It will actually index the content of web pages in your history and bookmarks. It's great. But I can't find any documentation on how to use it.

My understanding is spotlight doesn't index URLs that start with https:

One of the main wikis that I use has all pages behind https:, so I would very much like to change this.

  • Is there any way to get "mdfind" to spit out spotlight results for items other than files? (UPDATE: Thanks bmike, I looked more carefully on my system, and I see the bookmarks now.)
  • Are there any other tips or tricks I should know for using spotlight better with https and/or normal web pages?
  • It's my understanding that https is skipped for security reasons. Think about what could happen if spotlight started storing the content of your banking sessions, etc...
    – Fake Name
    Sep 21, 2011 at 17:45
  • That would be logical, but I'd really like a way to opt in for certain domains. If anyone has a reference that says this an intentional implementation, I'll call it an RFE and close the issue. Sep 23, 2011 at 23:53

1 Answer 1


I can't help you with the main thrust of how to index ssl content, but will take an attempt at the learning mdfind commands.

The man page for mdfind is thin, but shows you that you can search on anything that is classified. In your case, try a mdfind command to get some web history results - for me, this command shows several files Safari has squirreled away for spotlight to index.

mdfind stackexchange | grep Safari | grep History | head

From there, you can use mdls to pick apart what terms you might want to feed back into mdfind:

mac:Users mike$ mdls /Users/mike/Library/Caches/Metadata/Safari/History/http:%2F%2Fapple.stackexchange.com%2Fquestions%2F25487%2Flock-screen-with-launchbar.webhistory | tail
kMDItemFSName                  = "http:%2F%2Fapple.stackexchange.com%2Fquestions%2F25487%2Flock-screen-with-launchbar.webhistory
kMDItemFSNodeCount             = 14147
kMDItemFSOwnerGroupID          = 20
kMDItemFSOwnerUserID           = 501
kMDItemFSSize                  = 14147
kMDItemFSTypeCode              = ""
kMDItemKind                    = "Safari history item"
kMDItemLogicalSize             = 14147
kMDItemPhysicalSize            = 16384
kMDItemURL                     = "http://apple.stackexchange.com/questions/25487/lock-screen-with-launchbar"

A few tags that might be of immediate use to you are kMDItemContentType, kMDItemFSName, and kMDItemURL

You can see my mac has processed several hundred items with a URL that begins with https:

mac:Users mike$ mdfind "kMDItemURL == 'https:*'" | wc -l 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .