Getting started
Basics
Domains & Origins
Performance

Configuration
Basics
Conditions
Dictionaries
Domains & Origins
Request settings
Cache settings
Headers
Responses
Performance
Purging
Custom VCL
Image optimization
Video

Security
Access Control Lists
Monitoring and testing
Securing communications
Security measures
TLS
Web Application Firewall

Integrations
Logging endpoints
Non-Fastly services

Diagnostics
Streaming logs
Debugging techniques
Common errors

Account info
Account management
Billing
User access and control

Reference

    Specifying an override host

      Last updated September 27, 2019

    If you want to rewrite the host header being sent to your origin regardless of the host used in the initial request, specify an override host. Use this if you have multiple domains tied to a service and want them all served by the same origin, if the domain your origin is expecting is different than one specified in your Fastly service, or if the host header being sent to your origin is different from the host used in the initial request. You most likely won't need to use this feature.

    You can override the host header being sent to your origin by specifying the domain name of your override host on the Settings page for a specific service or by specifying a host on the Origins page for a specific host.

    Here are some examples of when to use an override host:

    Overriding a host at the host level

    You can add an override a host at the host level. Once you’ve added a host, follow the steps below:

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Edit configuration button and then select Clone active. The Domains page appears.
    4. Click the Origins link. The Origins page appears.
    5. In the Hosts area, click the pencil icon next to the host you want to edit. The Edit this host page appears.
    6. Towards the bottom of the Edit this host page, click the Advanced options link.
    7. In the Override host field, type the hostname of your override host header based on the origin you’re using. The value in this field will take precedence over anything you've set using the override host quick configuration. Keep in mind the following:
      • If you're using Amazon S3 as your origin, type <yourbucket>.s3.amazonaws.com.
      • If you're using Google Cloud Storage as your origin, type <your bucket name>.storage.googleapis.com.
    8. Click the Update button.
    9. Click the Activate button to deploy your configuration changes.

    Overriding a host globally

    You can globally override a host if your service has multiple domains to serve but they are all same assets (e.g., assets1.example.com and assets2.example.com) and you want to normalize them (e.g., assets.example.com). To globally override a host, follow the steps below:

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Edit configuration button and then select Clone active. The Domains page appears.
    4. Click the Settings link. The Settings page appears.
    5. Click the Override host switch. The Override host header field appears.

      Setting Override host

    6. In the Override host header field, type the hostname of your override host based on the origin you are using:
      • If you are using Amazon S3 as your origin, type <yourbucket>.s3.amazonaws.com.
      • If you are using Google Cloud Storage as your origin, type <your bucket name>.storage.googleapis.com.
    7. Click the Save button. The new override host header appears in the Override host section.
    8. Click the Activate button to deploy your configuration changes.

    Caveats about using the global override host

    There are situations when you may not want to use an override host:

    Back to Top