Cosmic JS Blog Stay tuned for community news, company announcements and updates from the Cosmic JS team.

How to Deploy a Website with a Custom Domain Using Cosmic JS


Cosmic JS is a powerful CMS API that allows you to manage content for your websites and applications faster and easier.  But did you know that you can also use Cosmic JS to deploy code to your website (in any language) from any GitHub repository?  In addition to deploying content and code, starting today you can also add unlimited domains to your deployed application.  This is revolutionary because it means that moving forward all you need to launch your website is a git repository, a domain name provider and Cosmic JS!  No more hosting server necessary!  I’ve added a couple of screencasts for your viewing.  Let’s get started.

Create a Bucket

After logging in to your Cosmic JS account, create a new bucket.  After creating your new bucket, you will be prompted to install an app.

Install an App

Let's go ahead and install an app, but you could just as easily skip this step and deploy your own application pointed to your Cosmic JS bucket.  After installing your app, you will be prompted to deploy the application.

Deploy the App

Next click "Deploy Web App" to launch the web application to http://[your-bucket-slug].cosmicapp.co.  Once you do this it will take about a minute for the application to deploy on a custom instance of the Cosmic JS app server.  While this is working its magic, let's add our custom domains…

Add Custom Domains

The Cosmic app server subdomain is great for development and staging, but when you go live, you're going to want to add our own custom domains.  Cosmic JS makes this incredibly easy by providing the option to add custom domains to your deployed application.  Here are the 4 easy steps:

1. Go to Settings > Deploy Web App > Add Custom Domains (upgrade your account if needed)
2. Add your custom domains
3. Click "Set Domains"
4. Go to your domain name registrar's website and point your A Name Records to the Cosmic JS app server located at 162.243.13.186

Now navigate to your domain and notice that you now have your application hosted at your custom domain!  Add as many domains / subdomains as you need!  Whenever you need to deploy changes to the app, just push the changes up to your GitHub repository and click "Redeploy Web App".

Cosmic JS now gives you the power to deploy a website faster and more nimbly than any other system.  And all you need is a git repository, a domain name provider and Cosmic JS!

You may also like


Building websites and applications with the Cosmic JS API is simple and intuitive for teams through role permissions.

Cosmic JS is on a mission to be the easiest way to manage content for your websites and applications, the latest update includes the ability to save your Cosmic JS objects as a draft.  This means you can continue to perfect your content privately and when it's ready to publish, simply click "Save" and the object will then be published and available on your bucket's API endpoints.  

This is another feature we've added in response to feedback we're getting during the Cosmic JS private beta release.  We'll keep rolling out updates in response to feedback, so please keep the feedback coming!

If you have not signed up, sign up now for Cosmic JS and join us during the private beta release as we continue to build out the best content management platform to handle needs for your websites and applications.

We're on a mission to help teams of all sizes collaborate to build apps faster and easier.  In some cases incorporating a new solution into a workflow for larger team involves challenges for user onboarding and management.

In this article I’m going to show you how to get the best of both worlds:  A website that is both dynamic, has content powered by the Cosmic JS API that is also a static website.  Our static website will be easily managed by a content editor using the Cosmic JS CMS and the developer will also be able to use Markdown files.

Download receipts for your Cosmic JS Buckets within your Dashboard. 

In this tutorial, I'm going to show you how to create a simple Sticky Notes app using React, Redux, Selectors, Redux Sagas, a little bit of Node, and Cosmic JS.