Manage domain
In this guide, you will learn how to connect a domain to RevasOS and configure it.
Create a new domain
A domain can be created within a website or added independently of a website.
Create a domain via a website
Adding a domain from a website will connect that domain to the website:
- Open the Websites app within RevasOS;
- Find the website you want to connect the domain to and click the button that says Connect a domain;
- On the page, enter the domain name (e.g. yoursite.com) and press Add;
- Configure the DNS by following the instructions in the domain configuration panel;
- Once the DNS changes have been applied, go back to RevasOS and click the "Verify" button.
If configured correctly, all the checkmarks will turn green and you will be able to visit the domain with the RevasOS website connected.
Create a domain from the Domains app
When adding a domain from a website, that domain will need to be connected to a website later:
- Open the Domains app within RevasOS;
- Click on the New domain button located in the top right corner;
- In the pop-up window, enter the domain name;
- Click Add domain;
- Configure the DNS following the instructions in the domain configuration panel;
- Once the DNS changes are applied, go back to RevasOS and click the "Verify" button.
If configured correctly, the domain will be verified.
Manage redirect rules
Redirects, or redirect rules, allow you to redirect traffic that visits your website to other pages or domains. For example, a user visiting www.yoursite.com/hello
can automatically go to the www.yoursite.com/contacts
page thanks to a redirect rule.
Adding redirects to a domain
- From the Websites app, click on the domain name under the website, then the cogwheel button and click Edit domain. From the Domains app, click the cogwheel button directly.
- Click the "Create rule" button and choose the type of redirect rule you want to add:
- Redirect between different domains: choose this type if you want to redirect from one domain to another domain (e.g. from miosito.it to altrosito.it), or from domain to subdomain (e.g. from miosito.it to www.miosito.it),
- Redirect between pages of a site: choose this type if you want to redirect between pages of the same site (e.g. from miosito.it/contatti to miosito.it/contattami),
- Advanced configuration: choose this type to manually create regular expressions to identify and modify the URLs for the redirects.
- If you have chosen the redirect between different domains, enter an identifying title for the rule then, in the two fields below, the starting domain (e.g.: sitoweb.com) and the domain to which you want to redirect the visitor who visits that domain (e.g.: ciao.sitoweb.com), then click "Save".
- If you have chosen the redirect between pages of a site, enter an identifying title of the rule, then, in the two fields below, the starting page (e.g.: /en-us/chi-siamo) and the page to which you want to redirect the visitor who visits that page (e.g.: ciao.sitoweb.com), then click "Save".
- If you have chosen the advanced configuration instead:
- Enter an identifying title of the rule,
- Write the rule to identify incoming requests. This rule allows you to identify the URLs you want to replace. Write it like this (replace the parts inside the square brackets, including the brackets):
matches(http.request.url.path, "^[the-parts/to-select]")
, - Write the expression for the redirect. This rule defines the rules to calculate the new destination of the redirect. Write it like this (replace the parts inside the square brackets, including the brackets):
regex_replace(http.request.url.path, "^[the-parts/to-replace](.*)", "[/the-new/value]$1")
, - Choose whether to keep the URL query string during the redirect. If you don't select these options, any string other than the path will be removed,
- Define the redirect code to be inserted in the header to tell browsers and crawlers what kind of redirect is being performed. By default, the redirect that is performed is a 301 redirect.
- Click "Save".
Edit redirect rules
- From the Websites app, click on the domain name under the website, then the button with the wheel and click Edit domain. From the Domains app, click directly on the button with the wheel.
- Click the name of the rule you want to edit to access the editing panel. Here you can edit:
- The identifying title of the rule,
- The rule to identify incoming requests. This This rule allows you to find the URLs you want to replace. Write it like this (replace the parts inside the square brackets, including the parentheses):
matches(http.request.url.path, "^[the-parts/to-select]")
, - The expression for the redirect. This rule defines the rules for calculating the new destination of the redirect. Write it like this (replace the parts inside the square brackets, including the parentheses):
regex_replace(http.request.url.path, "^[the-parts/to-replace](.*)", "[/the-new/value]$1")
, - The option to preserve the URL query string during the redirect. If you don't select this option, any string other than the path will be removed,
- Define the redirect code to be inserted in the header to tell browsers and crawlers what kind of redirect is being performed. By default, the redirect that is performed is a 301 redirect.
Deleting a redirect rule
- From the Websites app, click on the domain name under the website, then the cogwheel button and click Edit domain. From the Domains app, click the cogwheel button directly.
- Click the cogwheel button at the end of the line of the rule you want to delete.
- Click Delete and then Confirm.
Disconnecting a domain from a website
You can disconnect a domain from a website without deleting the domain from RevasOS:
- Open the Websites app within RevasOS;
- Click on the domain name under the website, then the cogwheel button and click Remove domain;
- In the pop-up panel that opens, click Remove domain to proceed.
Delete a domain
- From the Websites app, click on the domain name under the website, then the button with the wheel and click Edit domain. From the Domains app, click directly on the button with the wheel;
- Click Operations;
- Click Delete domain and again Delete domain;
- In the pop-up panel that opens, click to proceed with Delete domain.
Warning
This operation deletes the domain from RevasOS and consequently all the sites connected to this domain will no longer be accessible through this domain.