Home
Support Forums

Page Not Found After deployment

hey @KiMPo, have you tried downloading your site and seeing what gets generated? that might make it easier to check which settings are the right ones for you and whether you have an index file:

Hey @perry ,
That’s what I did try, after it deployed and I noticed it didn’t work, I downloaded the site (what was generated) and I can see the index.html file but I don’t see any of my markup in there at all. It’s like the dist is the wrong directory that I’e set for the build… but I’m not 100% sure why this is as this is how it’s all setup on my local. Would it help if I provided the downloaded log?
Also thanks for getting back to us on this one, greatly appreciated.
Kind regards,
Guy

Hey @KiMPo, could you please share your Netlify URL so we can take a look at your deploy settings and logs? In the meantime, wanted to share an Angular/Scully tutorial that may be helpful for seeing how a successful project is set up:

Heya @jen and @perry,
Greatly appreciate your help, I was able to get it working now. I didn’t have a netlify.toml file so I ended up adding that in with the build scripts and also added the appropriate build shortcuts to package.json and after deploying it looks like it’s working now! So thanks for the information.
Kind regards,
Guy

1 Like

Hello,

I notice that some of the API endpoints of my website show an 404 error.

For example https://admiring-wilson-2ff0fe.netlify.app/Mobiel_API/locations/geoJSON doesn’t work,

https://admiring-wilson-2ff0fe.netlify.app/Mobiel_API/locations/ does work both have an index.js file

all of the endpoints that take an argument https://admiring-wilson-2ff0fe.netlify.app/Mobiel_API/locations/[name].json.js throw an 404.

On my local environnement, everything works. I’m using sapper & svelte. I don’t know how to debug this.

Regards

Lieven

Hi, @Lirben. Please see the following support guide for more information:

If there are other questions that support guide does not answer, please let us know.

Hi Luke, thanks for your answer.

I can’t get my head around this. I’m trying to connect to an external API. After reading your post, I can imagine that I can only do this from the client and if i make endpoints in my sapper project these are typically server side routines, so those are not ok then?

However how can it be that some of the routes at this moment do work and others do not? Some of them even hold the exact same code

for example:
this one works: https://admiring-wilson-2ff0fe.netlify.app/Mobiel_API/locations/
this one does not https://admiring-wilson-2ff0fe.netlify.app/Mobiel_API/locations/geoJSON

although the code at those endpoints is exactly the same.

hi there, sorry to be slow to get back you you - any changes or progress as you work on this?

Hi Perry,

Thanks for asking. I’m a week older now (and more experienced in sapper). I learned from the docs (https://sapper.svelte.dev/docs#Exporting) That all pages must be reachable from the index in order to be put online.

From the docs:

Because of this, any pages you want to be included in the exported site must either be reachable by <a> elements or added to the --entry option of the sapper export command.

1 Like

what can i do? netlify is saying my page not found after deploying my site

Hi, @Michael_Ogaro. I only see two sites on your account and neither site has any successful deploys.

Both sites appear to be using manual deploys. How are you deploying these sites exactly? Drag and drop? Are you using Netlify CLI to deploy?

I have read this
[Support Guide] I’ve deployed my site but I still see "Page not found”

After deployment my site displays my 404.js file that is inside of my pages folder. The pages folder is inside of my src folder.

I have a public folder that has a 404.html and a index.html file.

What index.html do I put at the root of my folder?
I tried putting an index.html file in my root and then inside of this file, I placed the path to the index.html that is inside of my public folder. I did this via the src path inside of the index.html file I am currently in. ie src=’./portfolio/public/index.html’. This does not work. I get the same error.

What index.html file do I put in the root to solve this issue?

can you try downloading your site and seeing if what you are deploying is in the right directory structure as it should be?

I am seeing 404 after deployment. The initial homepage is fine but when I login, I get 404. The path of login is /login/?resource=clientUser. I have downloaded the site that gets deployed and I see index.html there as expected. I see a lot of comments around directory structure for deployment. What is the correct approach here? For my deployment settings, I have the following settings:

Base Directory: “Not set”
Publish Directory: build/

I checked out the docs here and I think Ive done everything right, so why am I still getting 404? Here is a link to my deploy settings

Hi, @johnnymac. It looks like your most recent production build resolved the issue.

If there are other questions or concerns, please let us know.

@luke My apologies. I meant after login I get 404. The homepage loads just fine but when routing to a different path, I get 404. I updated the post with that info. Basically, logging in directs to path /login/?resource=clientUser and returns a 404 when deployed.

hi there, can you check and see if this fixes your problem?

@perry My _redirects file is already in there. It looks like:

/*  /index.html 200
/login/?resource=clientUser /index.html 200

My deployment shows:

2 redirect rules processed

All redirect rules deployed without errors.

Happy to adjust if you have any suggestions but I added the second rule as the first did not work

Quite odd! Confirmed that redirect is in place. Tis hard to debug what we can’t see - could you DM me a test login we can use, or better would be confirming that it is ok for our team to use the signup link to create one to reproduce the situation?

hello

could you help me and tell me which directory to publish

thank you