How can I test search in staging or development environments?
Customers wishing to create development environments have two choices:
Create a new collection with a dedicated development index and pipelines
Use the same collection as the production environment and create separate development pipelines
Option 1 is most common for customers who have already separated their production and development data, whilst option 2 can be easier to manage for customers who use the same data in both environments.
When you create a Website Search collection and add a domain, e.g. www.website.com, we only authorize searches from the domain that you have added. If a search request is made from a staging site or development site, e.g. www.staging.example.com or www.dev-example.com, you will get an authorization error i.e. "Authorization for this request failed. Check your credentials".
How to resolve:
To test search in staging or development environments, you need add the domain or URL of the staging or development site in the Domains section of your Collection.
Make sure that the "Search from Domain" is enabled. You can also add and authorize IP addresses in the same way.