Skip to content

SERA integration on Akamai

Kindly follow the below steps to setup the routing of bot traffic to SERA.

Steps

  1. Open Akamai Dashboard, and Create new Configuration Version
    Step

    From now onwards, while creating any condition, uncheck the Case-sensitive name checkbox from the Additional Options menu.
    Step

  2. Creating Property configuration rule

    1. Create new rule in Property Configuration Settings
      Step

    2. Add following conditions :

      1. Path : Put condition to match respective page url pattern that will be sent to SERA
        Step

      2. User-Agent : Put is-one-of condition for following user-agents

        • During POC phase, add these agents :

          • *n7TestUserAgent*
          • *PTST*
          • *GTmetrix*
        • For going live with SERA, add these agents :

          • *n7TestUserAgent*
          • *PTST*
          • *GTmetrix*
          • *googlebot*
          • *google\ page\ speed*
          • *chrome-lighthouse*
          • *google-inspectiontool*
          • *PTST*
          • *GTmetrix*
            Step

      3. File Extension : Put is-not-one-of condition for following file-extensions
        ai, ashx, asmx, aspx, avi, avif, bmp, css, csv, dat, dmg, doc, eot, exe, flv, gif, ico, iso, jpeg, jpg, js, json, jsp, less, m4a, m4v, mov, mp3, mp4, mpeg, mpg, ogg, otf, pdf, php, png, ppt, psd, rar, rss, svg, swf, tif, torrent, tf, txt, wav, webm, webp, wmv, woff, woff2, xls, xml, zip
        Step

      4. Request Header : Put does not exists condition for x-nv-app header name

      5. Request Header : Put does not exists condition for x-nv-sera-bypass header name
        Step

      6. Also add a rule to exclude any requests containing the nsbp query parameter in their url

  3. Adding Behavior to the rule

    1. Scroll down to Behaviors section

    2. Click on + Behavior button
      Step

    3. Scroll down to Origin Server section, and fill following details :

      1. Origin Type : Your origin
      2. Origin Server Hostname : SERA_ENDPOINT (Use the one shared by N7 team with you)
      3. Forward Host Header : Leave as it is
      4. Cache Key Hostname : Leave as it is
      5. IPV6 Origin Support : Leave as it is
      6. Supports Gzip Compression : Leave as it is
      7. Send True Client IP Header : Leave as it is
      8. True Client IP Header Name : Leave as it is
      9. Allow clients To Set True Client IP Header : Leave as it is
        Step

    4. Scroll down to Origin SSL Certificate Verification, Ports, Origin TLS Version sections, and fill following details :

      1. Origin SSL Certificate Verification :
        1. Verification Settings : Choose Your Own
        2. Use SNI TLS Extension : Yes
        3. Match CN/SAN To : Leave as it is
        4. Trust : Akamai-managed Certificate Authorities Sets
        5. Akamai-managed Certificate Authorities Sets : Switch on both Akamai Certificate Store and Third Party Certificate Store
      2. Ports :
        1. HTTP Port : 80
        2. HTTPS Port : 443
      3. Origin TLS Version :
        1. Minimum TLS Version : Akamai Supported
          Step

    5. Scroll down to Caching rule section, and Delete it : Step

  4. Setting up Outgoing request header

    1. Scroll back up to Behaviors section top

    2. Click on Standrd property behavior
      Step

    3. Select Modify Outgoing request header from the list, and Click on Insert Behavior button
      Step

    4. Fill following details :

      1. Action : Add
      2. Select Header Name : Other
        1. Custom Header Name : X-NV-SERA-TOKEN
        2. Header Value : The value shared by N7 team with you
          Step

  5. Save and Activate

    1. Scroll to bottom, click on and Save button
      Step

    2. Switch to Activate tab, and Activate it in the respective environments
      Step

    3. To verify, access any page matching configured pattern, and with one of the configured user-agents. It should show few response headers starting with X-SERA

  6. Testing and Refinement

  7. Keep refining the logic by adjusting user-agent list, and SERA exclusion-patterns as needed.

  8. Test thoroughly:

    • WPT and GTMetrix will automatically receive the response from SERA due to the routing rule set above.

      • Steps to validate page using WPT
    • To check the SERA rendered page on browser, you can use DevTools > Network conditions facility, or some browser extension (like Simple modify headers) to manipulate the browser user-agent.
      If in testing phase, use these user-agent values:
      For desktop:

      n7TestUserAgent
      
      For mobile:
      n7TestUserAgent; Android
      
      If SERA is live, you can use these actual bot user-agent values:
      For desktop:
      Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +<http://www.google.com/bot.html)> Chrome/W.X.Y.Z Safari/537.36
      
      For mobile:
      Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; Googlebot/2.1; +<http://www.google.com/bot.html)>
      

  9. Whitelist SERA requests at your origin to avoid any issues with indexing. Details are here

  10. On go-live day, set the user-agent condition regex to actual bot user-agent values. Additionally, ensure that your condition is case-insensitive.

  11. After go-live, in any dashboards created for monitoring the "actual user traffic" e.g. Google analytics, exclude the requests with user-agent string containing word "Nitrogen SERA" to get correct understanding about user-traffic.