loading

Select Results Page Option and Add a Domain| Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • Refresher on JS Snippet vs. Subdomain Results Pages
  • Steps to Add a Domain & Best Practices

JS Snippet vs. Subdomain

Once you add or update to a Yext Answers search bar, you’ll need to make sure there is results page for the user to land at via the redirectUrl. As a reminder, this step is required for header search bar integrations and overlay modules that link out to a standalone search results page.

The results page is simply a landing page for the Answers search results. It can be hosted through the client/brand with a JS Snippet or through Yext on a subdomain. Check out the results page at yext.com/answers below:

results page

The above page can be created through a JS Snippet or Subdomain. Let’s walk through the domain set up and configuration for each one.

JS Snippet

The “JS Snippet” path maintains the integrity of a website’s header/footer and any changes made to the header/footer flow separately from changes made to the Answers experience (because it’s a component injected onto the search results page). No workflow is required from Yext for any header/footer updates. In this integration option, you will generate a JS Snippet to provide to your brand such that they can stand up a results page on a page in their CMS.

The Answers results page will typically live at one of the following:

  • brand.com/answers
  • brand.com/search

The brand will inject Answers into the page with the below snippet:

<div id="answers-container"></div>
<script src="[production_url]/iframe.js"></script>

The Administrator will provide the final production_url (which is technically possible once you publish to Production and covered in the next unit) to the brand.

Subdomain

You as the Administrator, or another team at Yext, will recreate the header/footer for this path and workflow is required with Yext any time the header/footer is updated to ensure changes flow through (because the Answers experience is replacing the search results page entirely).

The Answers results page will typically live at one of the following:

  • answers.brand.com
  • answers.brand.com

The brand will be able to integrate a Search Results page at the above URL once the Administrator 1) publishes to production (which we will cover in the next unit) and 2) once the brand has completed the CNAME step as outlined in Unit 5 and on our integration site here.

light bulb
Tip
If you are using Page Builder to create a header/footer (a common option for Answers Free Trials & Self Serve implementations), then you will actually select the JS Snippet option when adding your Answers domain. You’ll then stand up the results page separately via Page Builder, host the subdomain directly at the Page Builder page, and inject Answers with the JS Snippet. For more information, please read this community post and review our Pages track.

Steps to Add a Domain

Your domain format is dependent on the integration path. Remember, we will be injecting the Answers experience into an existing CMS page template (e.g., brand.com/answers or brand.com/search) in the Client Hosted JS Snippet path. We will publish directly to a Yext Hosted page (e.g., answers.brand.com or search.brand.com) in the Yext Hosted Subdomain path.

Navigate to Pages > Domains when you are ready to add your domain. You must add a domain before publishing to Staging or Production.

DNS Status 1

JS Snippet

In order to create a Client Hosted JS Snippet to inject into your page, you will add the following domain format directly to the Yext platform Domains screen:

  • answers-embed.brand.com

Navigate to Pages > Domains when you are ready to add your domain. Select “Add New Domain”, then select “Yes” for use with Answers, and lastly the “JavaScript Snippet” integration method:

JS Snippet Domain

Per the above format, you will add the domain as answers-embed.brand.com. If your main homepage is turtlehead-tacos.com, you would add the domain as answers-embed.turtlehead-tacos.com:

TT Domain 1

If you navigate back to the Domains tab, you’ll notice that the DNS and SSL statuses are automatically set to “Active”:

DNS Status 1

Lastly, assign the Domain to your Answers site:

TT Domain 3

Congratulations! You’re ready to publish.

Subdomain

The domain format for a Yext Hosted Subdomain integration path is simply the subdomain of your choosing, likely one of these two options:

  • answers.brand.com
  • search.brand.com

Navigate to Pages > Domains when you are ready to add your domain. Select “Add New Domain”, then select “Yes” for use with Answers, and lastly the “Subdomain” integration method:

TT Subdomain 1

Once you input your domain format, you’ll be prompted to set up the bridge domain using a CNAME record:

TT Subdomain 2

Congratulations! You’ve added the Subdomain. Once the CNAME record is configured, the DNS status will switch from “Pending” to “Active” in your Domains tab:

TT Subdomain 3

You will be able to publish as soon as the DNS Status switches to “Active” (meaning the CNAME is set up correctly). Lastly, assign the Subdomain to your Answers site:

TT Subdomain 4

Congratulations! You are ready to publish.

If you encounter any issues with your domain, please reach out in the Community!

light bulb
Unsure of Your Integration Path?
That’s okay! When you go to add your domain, just select the “Subdomain and JavaScript Snippet” option when adding your domain. You can always go back to the Domains screen and update your integration option once confirmed.
unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 2

    Which URL below is leveraging the Subdomain integration path?

    Error Success Question 2 of 2

    True or False: You should add a domain before publishing to Staging or Production

    Wahoo - you did it! 🙌

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Splash Loading