Shifter supports external server deploying using with web-hook and it enables you to copying generated contents to external server such as Netlify or Amazon S3 bucket.

You'll need to apply custom domain name to it on Shifter.

Domain name replacement process on generating artifacts

The generator on Shifter Static will replace the URLs of the resources from the original to the URL of Shifter CDN or relative path. If your website has been published on Shifter, only you should do is applying domain name to your website to rewrite URLs to the custom domain name; Shifter Static process it automatically.

If you're deploying artifact to external sever using web-hook, you'll need to do it with manually.


Domain name replacement process on generating artifacts

The generator on Shifter Static will replace the URLs of the resources from the original to the URL of Shifter CDN or relative path. If you're publishing the website to Shifter Static, apply domain name to your site. Shifter Static will rewrite URLs to the custom domain name automatically.

If you're deploying artifact to external sever using webhook, you'll need to do it with manually.



What happens if deploying artiafcts to the external server without applying a custom domain name.

Some URLs such as JavaScripts files added by WordPress are still set as URL of Shifter CDN.


URLs of Shifter CDN (e.g. abc123on.getshifter.io) will exist on deployed resources such as JavaScript added by WordPress. So deployed site will call resources on Shifter CDN, not on the deployed server. It may require BASIC authentication if you set it on Shifter.


How to apply custom domain name manually

  1. Access domain page of your Shifter site on Shifter Dashboard.
  2. Add domain name, get CNAME records to verify domain ownership.
  3. Add CNAME records to your DNS server and complete domain verification.
    Please refer support document for more details of these steps.
    Custom Domains on Shifter
  4. Attach domain name to the site with running a command on Shifter Domain CLI.
  5. Generate an artifact and confirm the custom domain name is applied.


Attaching domain name with Shifter Domain CL

Shifter Dashboard doesn't provide an interface to apply domain name for webhook published artifacts, currently.; but we're developing it. So, you'll need to do it with API or Domain CLI.


Command

$ npx @shifter/domain-cli attach --username USERNAME --password PASSWORD --site-id REPLACE-YOUR-SITE-ID --domain REPLACE-WITH-YOUR-DOMAIN-NAME --no-shifter-cdn

Example

$ npx @shifter/domain-cli attach --username shifter --password abc123 --site-id 7bf1bed4-a8fe-11e7-ae62-f2f909c1ded2 --domain shifter.example.com --no-shifter-cdn

Running the command without --no-shifter-cdn or set false (--no-shifter-cdn false), it will attach a custom domain name to the CloudFront on Shifter CDN. So, if you're trying to assign the domain name to your CloudFront after that, you'll get a failure error message.

Let's detach it on Shifter Dashboard then rerun the command with --no-shifter-cdn.

Did this answer your question?