Solved 👍: Apps Script deployed as a Web App returns 404 error

The problem

You deployed your Google Apps Script code as a Web App. However, when you open the web app's URL, it returns a 404 error.

Screenshot of a 404 error page.

Solution

When you deploy your script as a Web App, you will receive a URL like the following:

Sometimes the URL will contain /u/1/. If you see this in the URL, please remove it.

Next, if you deployed the script from within a G Suite domain. Please add /a/<your domain name> right after https://script.google.com.

Now, try opening the URL in your browser. Your web app will no longer return a 404 error and you should be able to see the output generated by your web app.

Screenshot of an Apps Script Web App displaying &quot;Hello World!&quot;.

Master Google Sheets Automation

Sign up to receive exclusive Automation tips and tutorials!
I'll send you actionable tips on automating tasks with Google Sheets and coding with Apps Script. You'll also be notified whenever new content is published.
PLUS: Get instant access to my Birthday Reminder Template! 🎂
By signing up you agree to the Privacy Policy & Terms.

Have feedback for me?

I'd appreciate any feedback you can give me regarding this post.

Was it useful? Are there any errors or was something confusing? Would you like me to write a post about a related topic? Any other feedback is also welcome. Thank you so much!