Publishing two versions of one site

So, I’ve used Netlify really well and love the workflow, but I’d like to try something a little unconventional …

Right now, I publish my GatsbyJS site to my Netlify site on sales-person-bear-88032 which is using the domain

What I’d like to do is also build to another netlify site but use gatsby-plugin-no-javascript, the idea being that I could give the user the option to visit the JS enabled site if they wanted some extra features.

I think that using a build parameter would be a good option here, but I tried to set up a new Netlify install using the same GitHub repo and it’s not showing anything ( nostalgic-swartz-ce5a2b ), so I assume its not possible.

Does anyone have an idea of how I might be able to do that, perhaps using CircleCI or some other method …?

hm, @endymion1818, I don’t have an answer to your immediate question, but I am wondering if there is maybe a simpler approach.

Have you considered keeping all the content on one site and using a redirect to be able to distinguish traffic? or, using branch deploys for different kinds of content?

Hi Perry, there have been some updates on this.

  • I can now deploy 2 Netlify sites from the same GitHub repo, which solves one problem. I don’t know if anything changed on Netlify, or I just did something I shouldn’t have!
  • That means I can use a environment variable to turn JS on & off for the two sites during the build process
  • The only trick left is the domain, I’d like to use for the one, and for the other. I have set it up but it isn’t currently working … not sure if that’s to do with the TTL or not …

@perry would you mind taking a look for me? This would make a great blog post if we can get it working …

Hi, @endymion1818, I’m seeing two issues:

  • the DNS record (a CNAME record) for which points to the site subdomain is missing:
$ dig CNAME  +noall +answer

; <<>> DiG 9.10.6 <<>> CNAME +noall +answer
;; global options: +cmd

The second issue is that there is an inactive DNS zone at Netlify for this domain here:

That DNS zone must be deleted (or activated - whichever you prefer) as explained in this community support guide.

Would you please make those two changes? If so, it should work. If it doesn’t resolve this issue or if there are any questions, please reply here anytime.

Got it!

I am now deploying two versions of my site:

HTML & CSS only:

Thanks Luke that was really helpful information.