Why can't I load my app with HTTP in the embedded preview?


If you try to load your site in the preview embedded into the IDE then it won’t load there and you can only load over HTTPS. Why can’t you open your application in the embedded view using HTTP?

Failure of window.location http:inside c9 IDE

To ensure your code is safe, Cloud9 uses the https protocol to load the IDE. That means anything else that is loaded in that browser window must also load via https.

The preview pane uses an iframe to load pages and the browser prevents pages from loading via http (without an “s”). To view a preview with http, open it in a separate tab.


I am trying to open it in a separate tab but its still not working.

var http = require('http');
http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World\n');
console.log('Server running at');

This is my code.


Hi there, Raju. For C9 server your should use ENV_PORT insted of


To clarify, please use process.env.PORT instead of 1337, and process.env.IP instead of