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

A post was split to a new topic: Questions about “Page not found” issues

A post was split to a new topic: “Page not found” questions for site

Hey, so I have the site https://enbyss.com/content/ which shows a list of posts that I’ve made, If you click on the first one, it takes you to the article as it should. If you refresh the page at that point however, it’ll give you a 404 error.

If I paste the link directly here as well: https://enbyss.com/content/articles/the-beginning
You can click on it, and it will give you a 404 as well. I’m not sure what is really happening here, since this doesn’t happen when I launch the site locally.

I built the site using Nuxt.js, with static site generation, as a single page app by the way so it should be working. The URL above uses the whole _param.vue syntax in order to check for a URL parameter. I can’t really add an index.html for a dynamic page.

What am I supposed to do?

Nevermind, I solved it on my side. Turns out I needed to add the following to my nuxt.config.js

  generate: {
    async routes () {
      const { $content } = require('@nuxt/content');
      const files = await $content({ deep: true }).only(['path']).fetch();

      return files.map(file => file.path === '/index' ? '/content/' : '/content' + file.path);
    }
  },

Now it works.

2 Likes

@Dennis I have a successful deploy and I am getting the Page not found air still. I think it is because I don’t have an indext.html rather I have a file that is the main file but called something else. Can we make it so that that file is the main one in Netlify?

hi webhoster22, no, unfortunately. index.html is a the standard on most internet servers worldwide, and is the standard on netlify too.

Hey so I put up a site on GitHub and then onto Netlify and it worked perfectly just like how they do every time I do it. But for some reason after I made a second commit onto my project, I am now getting the message:

“Page Not Found
Looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site.”

Someone please help because this is my midterm project and I need it in by this weekend, thank you.

Netlify: https://pedantic-mirzakhani-d5855a.netlify.app/
GitHub: https://github.com/Christian-Ferris/uncle-p-pizza

Hi, @Christian-Ferris. Did you try downloading your deployed files to see what the deploy contained?

There is no index.html file and we do cover this above:

Indeed, when I check the public repo and there is no index.html file:

screenshot

This path works though (because there is a pizza.html):

https://pedantic-mirzakhani-d5855a.netlify.app/pizza

​Please let us know if there are other questions.

Hello,

I’ve deployed my site and all worked perfectly.

I’ve updated my files and since, I’ve an error 404, page not found. I had 2 index.html, so I “hide” one in a folder, so to have just one index.html, but it still doesn’t work.
What’s wrong with my files ? Do I have to rename my indexEn.html with another name ?

Thank’s for your help

@imanservisi Welcome to the Netlify community.

Please help us help you by writing a good post!

All issues: Provide your Netlify site name (e.g. gifted-antelope-58b104.netlify.app).

DNS issues: Tell us your custom domain(s) (e.g. mycustomdomain.com). We can’t help if we don’t know your domain.

Build issues: Tell us about your workflow, including what SSG you are using.

If you are deploying via git, give us the URL of the repository.

Let us know what you have already tried and what the results were.

The better the post = the faster we can help!

Did you try downloading your deployed files to verify that each of your files is where you (and Netlify) expect it to be?

Hello. I just joined Netlify today and I was trying to publish my static portfolio website, I also bought my own custom domain. My site is published. However, when I try to open it, it says page not found. I have read the above posts but couldn’t really understand much.
This is my Netlify site name: https://saimaliportfolio.com/
I’d appreciate if anyone could provide me with some help. Thanks :slight_smile:

Hi, @imanservisi. I downloaded your deploy I see only one file in it named: indexen.html

For this reason, your site will returned page not found because of what we said above:

For your site, the page is displayed at this URL (replacing “<site subdomain here>” with your real subdomain):

https://<site subdomain here>.netlify.app/indexen

For you, @Saim, there are two issues:

  1. there is a directory which all the files are nested under
  2. there is no index.html

For your site, the following URL does work for me:

https://saimaliportfolio.com//5.personal%20portfolio/portfolio

If you download the deploy, the reason for this should be more clear. You will see a directory named “5.personal portfolio” (with a space in the name) and then all the assets under that directory. Again, there is no index.html but there is a portfolio.html under that directory.

If there are other questions about either site, please let us know.

Thank you!
I changed the HTML file to Index.html and also uploaded individual files instead of one folder. I redeployed the website and the following domain still doesn’t work: saimaliportfolio.com
However, the domain provided above still works.
I want my website to be on the domain I bought.
Sorry for the disturbance. Thanks! :slight_smile:

@Saim Sounds as though you need to download your deploy to see where your files are. You MUST have an index.html file at the very top level of your website for your “bare” domain to work.

Sorry but I don’t get what “at the very top level of my website” means? Could you please explain how do I do that? Thanks.

@Saim “At the top level” means that the index.html file is not inside of any folder or directory.

I did make that change. You can see it here:


The domain is working, but it only contains HTML. All the CSS and other files didn’t apply? Help please :slight_smile:

@Saim You have links to your other assets, but those assets are not in the locations where the links point:

If you fix this issue – perhaps by moving the assets “up” out of subfolders – your site will display properly.

Not to be rude, but this isn’t really a Netlify issue. You may want to study some materials on basic website construction, or even become more familiar with how computers store files.

1 Like

Thank you, it’s working now. Yh, I should really learn the basics first. :slight_smile:

I have no idea what I did wrong but now my site has a 404 error on every page. I don’t know what caused it, but I thought it was ImgBot at first, but I am pretty sure that it was a successful deploy that caused it!? It’s not an index.html problem because it is effecting every page of the site. (The website broke before ImgBot started committing) I have even tried to rollback, without success. I’ll show the deploy log for the last successful that I’m sure caused it
3:41:53 PM: Build ready to start

3:41:55 PM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41

3:41:55 PM: build-image tag: v3.5.0

3:41:55 PM: buildbot version: 8df8a50b1177b0b57364d20e0ea150448924cebf

3:41:55 PM: Fetching cached dependencies

3:41:55 PM: Starting to download cache of 21.0MB

3:41:56 PM: Finished downloading cache in 306.513836ms

3:41:56 PM: Starting to extract cache

3:41:56 PM: Finished extracting cache in 210.284292ms

3:41:56 PM: Finished fetching cache in 524.023597ms

3:41:56 PM: Starting to prepare the repo for build

3:41:56 PM: Preparing Git Reference refs/heads/main

3:41:58 PM: No build steps found, continuing to publishing

3:41:58 PM: Starting to deploy site from ‘/’

3:41:58 PM: Creating deploy tree

3:41:58 PM: Creating deploy upload records

3:41:58 PM: 0 new files to upload

3:41:58 PM: 0 new functions to upload

3:41:58 PM: Starting post processing

3:41:58 PM: Post processing - HTML

3:41:58 PM: Post processing - header rules

3:41:58 PM: Post processing - redirect rules

3:41:58 PM: Post processing done

3:41:59 PM: Site is live :sparkles:

3:42:00 PM: Finished processing build request in 4.4063185s
Now here is the first failed one (Done by ImgBot)
3:45:02 PM: Build ready to start

3:45:03 PM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41

3:45:03 PM: build-image tag: v3.5.0

3:45:03 PM: buildbot version: 8df8a50b1177b0b57364d20e0ea150448924cebf

3:45:03 PM: Fetching cached dependencies

3:45:04 PM: Starting to download cache of 24.4MB

3:45:04 PM: Finished downloading cache in 316.02437ms

3:45:04 PM: Starting to extract cache

3:45:04 PM: Finished extracting cache in 218.269016ms

3:45:04 PM: Finished fetching cache in 542.766791ms

3:45:04 PM: Starting to prepare the repo for build

3:45:04 PM: git ref pull/2/head does not exist or you do not have permission

3:45:04 PM: Failing build: Failed to prepare repo

3:45:04 PM: Failed during stage ‘preparing repo’: git ref pull/2/head does not exist

3:45:04 PM: Finished processing build request in 1.192467649s

My website address is https://mesyeti.gq
And the GitHub for it is https://github.com/MESYETI/mesyetigq