WORKING WITH HOSTNAMES

Two steps are necessary in setting up multiple hostnames within one Umbraco installation. You must instruct the Web server to listen to the required hostnames, and then you must tell Umbraco where to redirect the request. IIS (Internet Information Services) is the Web server that Umbraco uses because it is based on .NET.

To set up your IIS website to bind to one or more hostnames, follow these instructions:

  1. Open your IIS server console by searching for Internet Information in your Start menu search box, as shown in Figure 7-5.
  2. Navigate to the website that you want to change by expanding the {Your Computer Name} and Sites nodes in the left-hand pane, as shown in Figure 7-6.
  3. Locate the website to change and right-click to open the context menu, and then click the Edit Bindings menu item.
  4. In the resulting dialog, click the Add button. The Add Site Binding dialog appears.
  5. Enter the hostname that you want to add; in this case umbracousersguide.se.local, as shown in Figure 7-7. You can leave all other fields with their default values.
  6. Click the OK button in the Add Site Binding dialog.

    FIGURE 7-5

    image

  7. Click the Close button in the Site Bindings dialog.

    FIGURE 7-6

    image

    FIGURE 7-7

For local development and testing, you can use your Windows hosts file to set up pointers ...

Get Umbraco User's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.