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.

Solution
When you deploy your script as a Web App, you will receive a URL like the following:
https://script.google.com/macros/s/AKfycbzeIVAZxmaJreUILd3Ub7wrLj_a7xlYDOB3MU66vNPter-S1t0/exec
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
.
https://script.google.com/a/example.com/macros/s/AKfycbzeIVAZxmaJreUILd3Ub7wrLj_a7xlYDOB3MU66vNPter-S1t0/exec
🛈 Please replace example.com in the above URL with your G Suite domain.
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.

DISCLAIMER: This content is provided for educational purposes only. All code, templates, and information should be thoroughly reviewed and tested before use. Use at your own risk. Full Terms of Service apply.
Small Scripts, Big Impact
Join 1,500+ professionals who are supercharging their productivity with Google Sheets automation
By subscribing, you agree to our Privacy Policy and Terms of Service