Documentation

Websites and domains

5 min read Updated From the StackRegent manual

Every website belongs to a subscription. A subscription has one main domain, plus the extra websites, subdomains and aliases its plan allows. Hosting Services › Domains lists them all, with subscription, subscriber, disk, traffic and state.

Add a domain, subdomain or alias#

  1. Open the subscription (Hosting Services › Subscriptions, then click its name).
  2. In the Websites and domains card, click Add Domain, Add Subdomain or Add Domain Alias.
  3. Fill in the dialog:
    • Add Domain: enter the Domain name. You can also set a Document root: the folder inside the webspace that holds the website's files. It defaults to a folder named after the domain.
    • Add Subdomain: enter the Subdomain name and choose the parent website from the list next to it. You can also set a Document root.
    • Add Domain Alias: enter the Domain alias name and choose the website under For the domain. Under Settings, choose any of Synchronize DNS zone with the primary domain, Mail service, Web service and Redirect with the HTTP 301 code.
  4. Click Add. IIS is configured in the background.

To remove one, click the × next to it. Removing a website also deletes its subdomains, aliases and document root folder. The main domain can only be removed with its subscription.

The website page#

Click Manage next to a website to open its page. The header shows the Windows user the site runs as and whether IIS runs it, with these buttons: Open, Preview (when Website Preview is on) and Re-apply settings. Re-apply settings writes all the website's settings to IIS again; use it when a site behaves differently from what the panel shows. The Website tools tiles open the pages below.

Hosting Settings#

Open Hosting Settings from the website tiles.

  • Document root: a folder inside the webspace, for example httpdocs or httpdocs/public.
  • Preferred domain: None (both names open the site), www.\<domain\> (the bare name redirects with 301), or \<domain\> (www. redirects with 301).
  • Security: SSL/TLS support and Permanent SEO-safe 301 redirect from HTTP to HTTPS.
  • Web scripting and statistics: PHP support, version and handler, ASP.NET, CGI, ASP and SSI, web statistics and custom error documents.
  • Advanced: Additional write/modify permissions and Web Deploy publishing.

A website starts with its subscription's values. Values changed on the website are marked ●. Use subscription values (N) undoes them. Save applies the changes to IIS.

IIS Settings#

Open IIS Settings for the web server's behaviour on this site:

GroupSettings
Directory browsingAllow browsing folders without a default document, plus which columns to show.
Documents and errorsDefault documents, in search order (comma-separated) and Error pages (detailed errors locally only, error pages for everyone, or detailed for everyone).
Logging and compressionLog visits, Compress static files, Compress dynamic responses.
RequestsMaximum request size in MB, Custom response headers (Name: value per line), Additional MIME types (.ext type/subtype per line).
HTTPS and cachingSend HSTS, HSTS lifetime, HSTS also covers subdomains, Browser cache lifetime of static files.
AuthenticationWindows authentication in addition to anonymous access.
Request flood protectionBlock addresses that send too many requests, with concurrent-request and per-interval limits. This needs the IIS feature IP and Domain Restrictions.
Access restrictionsDefault access (allow all except, or deny all except) and a list of Addresses (one IP or CIDR network per line).

Turn on HSTS only when HTTPS works for every name of the site.

Virtual Directories#

A virtual directory publishes a folder of the webspace under a path of the website, for example /images.

  1. Open Virtual Directories and click Add Virtual Directory.
  2. Enter the Path (for example /images) and the Folder inside the webspace.
  3. Tick Create as an IIS application if the folder needs its own ASP.NET application domain. It stays in the same application pool.
  4. Choose Permissions (Read only, Read and run scripts, Read, scripts and executables or No access) and Directory browsing (As the website, Allowed or Not allowed).
  5. If you want, turn off Anonymous access to ask for a Windows login. You can also set Default documents and MIME types.
  6. Click Add.

Removing one leaves its folder in place.

Website Preview#

Website Preview lets you open a website hosted here before its DNS points at the server. Set it up under Tools & Settings › Website Preview:

  1. Tick Allow website preview.
  2. Set the Port. The installer opens 9444 in the firewall. If you choose another port, open it in the firewall yourself.
  3. Click Save. If you changed the port, restart the StackRegent service from Services Management.

Previews have addresses like https://<server>:9444/example.com/, opened with Preview on each website's page. Anyone with the address can open one.

Website Copying#

Open Website Copying to copy the website's files into another website on this server, or to an FTP or SFTP server. This copies files only, not databases.

  1. Under Copy to, choose A website on this server and pick it. Or choose An FTP or SFTP server and enter the Protocol, Server and port, User name, Password and Folder. You can also tick Use FTPS (explicit TLS).
  2. Under Files already there, choose Keep them; copy only files that are missing, Replace files with the same name, or Remove everything in the target folder first.
  3. Click Copy.

Website Importing#

Open Website Importing to bring a website from another host into this one.

  1. Under Files, enter the old host's FTP or SFTP details and the website's Folder there (for example public_html). Then choose how to treat Files already there.
  2. Under Databases, click Add a database for each MySQL or MariaDB database. Enter the old Server and port, the Database name, User name and Password, and Into database: a database of this subscription, which is created if it does not exist. The old host must accept remote database connections.
  3. Click Import and follow the task.

Logs#

Open Logs to read the IIS access logs of the subscription's websites and the PHP error log.

Choose the file and how many lines to show (Last 50 lines to Last 5000 lines). You can also type a Filter, or tick Follow to refresh every 5 seconds. Download saves the file and Remove deletes it. IIS buffers log lines for up to a minute, so new visits can take that long to appear.

Failed Request Tracing#

Use this to find out why requests fail or are slow.

  1. Open Failed Request Tracing.
  2. Tick Trace failed requests. Set Status codes (for example 404,500-599; the default is 400-999). You can also set Also trace requests slower than (in seconds; 0 means off) and Keep at most (the number of trace files).
  3. Click Save, then reproduce the problem.

The Traces card lists each trace (time, URL, status, time taken), with Download all (ZIP) and Remove all. Files are kept in logs\FailedReqLogFiles. Turn tracing off when you are done.

Was this article helpful?

Something missing? Ask in the community or open a ticket.