27
Views
3
Comments
Solved
Domain of Site Rule Different from Domain of the Environment?
Question

I am reading SEO-friendly URLs for Reactive Web apps.  One of the prerequisites is that "the domains used in the SEO rules should correspond to domains are effective in the environment."

There is this example in the section of Site Rules: Under the production-environment.devexample.com environment, map your MyAppHomeModule app to a new URL, such as example.com/myapp. So, when you enter www.example.com/myapp in the browser, the platform loads the MyAppHomeModule home screen. 

In this example, the domain of that site rule is example.com; while the domain of the environment is devexample.com.  The domain of the site rule is different from that of the environment.  Does it contradict the prerequisite above? 

Solution

You can follow all those steps and set the hostname of your environment to www.company.com, for example, to replace company.outsystemsenterprise.com.

The application that you previously had at https://company.outsystemsenterprise.com/ApplicationA will now be available at https://www.company.com/ApplicationA.

Now if you want to create a site rule to also make that application available at https://applicationA.company.com,  you need to do some of the previous steps again to:

  1. Configure DNS by creating a CNAME DNS record of applicationA.company.com pointing to company.outsystemsenterprise.com
  2. Make sure that the certificate that you uploaded previously is valid for applicationA.company.com, either with a wildcard certificate for *.company.com or with a certificate with a Common Name for www.company.com and a Subject Alternative Name for applicationA.company.com. If the one you uploaded doesn't have that, issue a new one and upload it.

Then create a site rule with a base URL of applicationA.company.com and choose ApplicationA as the root application

In my experience this works for both Traditional and Reactive apps.

From what I understand, it doesn't contradict the prerequisites

I believe that what is meant by a domain "effective in the environment", is a domain that was correctly configured to be used in the environment regarding SSL\TLS certificates and DNS settings, and that is why in that same paragraph two links are mentioned to configure those for PaaS and self-managed infrastructures.

In the example you mention, both example.com and production-environment.devexample.com would have to be correctly configured in DNS and in the certificates used.

Only one of them would be configured as the environment address, but the other could also be used for site rules.


I was under the impression that the domain of the Base URL of a site rule must be the domain of the environment address. You point out that the former can be different from the latter. 

We are hosting our applications on OutSystems Cloud.  Our environment address is company.outsystemsenterprise.com.  The URL of Application A is https://company.outsystemsenterprise.com/AppicationA.  

  1. If we want to set up a site rule that redirect user from https://applicationA.company.com to this application, are we required to follow the steps in Use your SSL domain in OutSystems Cloud - OutSystems 11 Documentation to upload the SSL certificate of *.company.com to OutSystems Cloud?
  2. If yes, are we required to skip certain steps there? e.g. Skip the third step of assigning the certificate to the environment because we will not use the domain company.com as the environment domain?
Solution

You can follow all those steps and set the hostname of your environment to www.company.com, for example, to replace company.outsystemsenterprise.com.

The application that you previously had at https://company.outsystemsenterprise.com/ApplicationA will now be available at https://www.company.com/ApplicationA.

Now if you want to create a site rule to also make that application available at https://applicationA.company.com,  you need to do some of the previous steps again to:

  1. Configure DNS by creating a CNAME DNS record of applicationA.company.com pointing to company.outsystemsenterprise.com
  2. Make sure that the certificate that you uploaded previously is valid for applicationA.company.com, either with a wildcard certificate for *.company.com or with a certificate with a Common Name for www.company.com and a Subject Alternative Name for applicationA.company.com. If the one you uploaded doesn't have that, issue a new one and upload it.

Then create a site rule with a base URL of applicationA.company.com and choose ApplicationA as the root application

In my experience this works for both Traditional and Reactive apps.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.