Question

page can’t be found

So I built web app and deployed it to DigitalOcean. When I singin or up it works just fine but when I refresh i get this message:

# This lookmeup.io page can’t be found

No webpage was found for the web address: **https://lookmeup.io/profile**

HTTP ERROR 404

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Fixed!

Had to add - path: '/*' inside of app spec, for some reason it was blank.

Bobby Iliev
Site Moderator
Site Moderator badge
July 17, 2023

Hi there,

It seems like your app is not properly handling the /profile route on a hard refresh. This is a common issue with SPA sites where the routing is typically handled on the client-side by JavaScript.

When you refresh the page, the server tries to resolve the /profile route but it can’t find it because it’s actually a client-side route, hence the 404 error.

To solve this, you will need to implement a fallback route on your server that will return the index.html file for all requests that do not match a static file. This allows your JavaScript to load and handle the routing.

For the App Platform, you can implement a catch-all route by following the steps here:

https://docs.digitalocean.com/products/app-platform/how-to/manage-static-sites/#configure-a-static-site

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel