Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

How to stop search engines from indexing the default Portal domain?



We implemented a custom domain on the portal for our client. Now, the portal can be accessed via two domains:

  1. The default PA Portals domain, e.g.
  2. The custom domain provided by our client, e.g.

This is a bit problematic for our client because they do not want the default domain ( to be visible with search engines. They are also using Google Tag Manager for site analytics and now they are getting duplicated analytics (from the custom and the default domain) which messes up their data.

Is it possible to somehow "block" the default domain from being searchable? Is it maybe possible to use 'no index' directives when the pages are returned from the default domain? And to remove gtag scripts from the DOM? Is this even a viable solution?

Super User
Super User

Hi @FilipB ,

This is an interesting requirement. I don't think this will be achievable with noindex meta tags as you are specifying it on the page level and pages that served by custom domain and by default are basically the same pages. Same for gtag script. You might try to use request liquid object to get the URL of the opened page or page tag but I don't think that this approach will work either. Maybe others will be able to propose other approaches.

If you find this post helpful consider marking it as a solution to help others find it.

Thanks for the reply!

This solution also crossed my mind but it sounds a bit sketchy. As you've said, the problem is that the content is actually being served from the default domain (and the custom one is just a redirect).

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,702)