Hacker News new | ask | show | jobs
by up_o 1005 days ago
For locking to a particular domain I had always added `site: example.com` to the query, rather than adding domain to a double quote statement.

I have used double quotes to limit to a particular _phrase_ as recently as last week. I'm not privy to the improvements you mention, do you have a link?

1 comments

The site:domain.tld syntax should not have a space between the colon (:) and the (sub)domain.

Incorrect:

site: domain.tld

Correct:

site:domain.tld

The - modifier to exclude a word does not have a trailing space.

Incorrect:

- site:domain.tld - query

Correct:

-site:domain.tld -query

I’m less certain about excluding a verbatim phrase, but I believe you can do as follows.

-“exclude this query string”

While this space rule still applies, so don’t insert a space, although this needs more testing by me to know for sure that this exclusion works properly.

- “this is not correct syntax imo”

https://ahrefs.com/blog/google-advanced-search-operators/