Skip to content

Header conditions

This section shows the steps to configure header based condition.

Typical use-case is, you would want to pass all the bots requests to sera.n7.io.
Here, you can achieve it by providing all Bot patterns by setting the value of user-agent request header.

Note: Header conditions will work only on request-headers.
For demo purpose, we will be using example.com domain as an example. Here, we will only be using googlebot and bingbot user-agent for simplicity.

Prerequisite

  1. You must have a domain configured on Nitrogen.

Steps

  1. Click on Settings menu, and open Header Conditions tab.
    Step

  2. Click on Create button.
    You will now be taken to a screen to provide header details.

    1. Group Name: Provide short name about the header condition.
      For example , you can provide a meaningful name like Sera Bots.

    2. Header Name: Enter the request-header name as user-agent

    3. Header value: Enter a regex expression here that should be matched for the required bots to be passed through SERA.
      For example, (?i)(googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest/0.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|redditbot|applebot|flipboard|tumblr|bitlybot|skypeuripreview|nuzzel|discordbot|google\ page\ speed|qwantify|bitrix\ link\ preview|xing-contenttabreceiver|chrome-lighthouse|telegrambot|google-inspectiontool)
      Note: By default header value match is case-insensitive.
      Step

  3. Click on Save button. The configured pattern will be showed in Header conditions list.

You can now use this condition at many other places such as Condition Groups.

Notes