It is possible to use Outseta across domains such as mydomain.com, app.mydomain.com, and learn.mydomain.com. 

However, there are things to look out for regarding Protected Content and Authentication. 

Protected Content

Protected content will apply across all domains. If you add a protected content group using the rule "starting with the-course" to protect a course on one domain, you cannot have a sales page on the same path the other domain.

When working across domains, it's worth spending time planning a URL structure that makes sense for your use case. 

The above example could be solved by having the course sales pages nested under courses.

If you are looking to protect an entire domain, a common scenario is when hosting an app on app.mydomain.com and the marketing site on mydomain.com, you'll need to do so with a custom snippet.

Authentication

By default, authentication does not persist across domains, meaning your users must log in for every domain. 

To change that, configure Outseta to use a cookie for the token storage method in your head script. Your users' auth state will persist authentication across domains.

<script>
<!-- Outseta Script Options -->
var o_options = {
domain: "<your domain>.outseta.com",
// ... other options you might have added ...
tokenStorage: "cookie",
};
</script>

<!-- Outseta Script (doing all the magic) -->
<script src="https://cdn.outseta.com/outseta.min.js" data-options="o_options"></script>

Post Login URL

By default, logging in from any of the domains will redirect your users to the URL configured at Auth > Login settings > Post Login URL in Outseta.

However, you might want to keep the users on the domain they were on when logging in. This is possible by adding additional auth configurations to the head script.

<script>
<!-- Outseta Script Options -->
var o_options = {
domain: "<your domain>.outseta.com",
// ... other options you might have added ...
tokenStorage: "cookie",
auth: {
// Overrides the Post Login URL
authenticationCallbackUrl: window.location.origin + "/your-post-login",
}
};
</script>

<!-- Outseta Script (doing all the magic) -->
<script src="https://cdn.outseta.com/outseta.min.js" data-options="o_options"></script>

Change "/your-post-login" for your post login path, or remove  + "/your-post-login" to make the post login URL the current domain home page.