title: Configure Subdomain with Heroku and Google domains?
body: <p>I want to configure a subdomain on my main website. For example, <code>www.something.com</code> and <code>something.com</code> redirect to the same main website.</p>
  
  <p>I want to add <code>hi.something.com</code> and for this, I used on my nodejs application vhost.</p>
  
  <pre><code>var vhost = require('vhost');
  
  app.use(vhost('hi.something.com', require('./routes/hiIndex')));
  //In (./routes/hiIndex) theres just an app.get telling it which page to render when it reaches this URL
  </code></pre>
  
  <p>When testing it locally, it works, but once I deploy my application to heroku and try to access <code>hi.something.com</code> it doesnt work, it redirect me to the main website, meaning <code>something.com</code></p>
  
  <p>Do I need to add some extra configuration, perhaps on the DNS settings for google domains or on Heroku? </p>
  
  <p>If so, do I just point it to <code>something.com</code> ??</p>
  
  <p>I have worked with redirect to other websites in form of subdomains but this is my first time trying to make it work from my own application.</p>