title: Apps Script Refused to Connect
body: <p>I am trying to learn Apps Script and some fron-end web dev. I wrote some some code in Apps Script and I am trying to render it in a Google Site.</p>
  
  <p>Here is the doGet function that I use in my Apps Script:</p>
  
  <pre><code>function doGet() {
    var template = HtmlService.createTemplateFromFile('Index');
    return template.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME);
  }
  </code></pre>
  
  <p>Interestingly, the script renders itself when I use the Google-given URL:
  <a href="https://sites.google.com/corp/view/vrajlinkshortener" rel="nofollow noreferrer">https://sites.google.com/corp/view/vrajlinkshortener</a></p>
  
  <p>However, that is not the case when I enter the custom domain:
  www.wharton.ml</p>
  
  <p>I checked the documentation and I still could not figure out why a custom domain would prohibit Apps Script form working.</p>
  
  <p>Any tips? Thanks!</p>