Error 404 Page Not Found

Hi. I’m new to this. I’m moving my very simple static HTML and CSS code from iPage to Kinsta with a plan to cancel my iPage account to avoid being automatically overcharged this week again. I copied my code to Github and then connected my Github account to my Kinsta account. Using no Build Command, no Node Version, and no Publish Directory, it deployed fine with no error, but when I click on the link to my latest deployment I get the dreaded 404 Page Not Found error. I read about this error on the troubleshooting page but still I’m not smart enough to figure it out.

Hello there @RMVolleyball (Mary) :wave: and welcome to Kinsta Community!

That 404 error not found in Static Site hosting is usually means there’s no index.html file found in the site’s root folder.

Could you please confirm if you have the index.html file on your GitHub root folder (as you mentioned “no Publish Directory” I would assume you tried to deploy the Static Site from your GitHub repo’s root folder instead of from any sub-folder)?

In case your HTML files (and other static files) are stored in a subfolder in your GitHub repo, then in the Publish directory field, you would need to specify it with that same path/subfolder name - relative to the root of your repository.

I also just tried the same to test to re-deploy on my own Static Site site/account (with the index.html file stored in my GitHub repo’s root folder - no Build Command, no Node Version, and no Publish Directory) and I could deploy and access it just fine.

Best regards,
Agus

Hi Agus,

Thank you very much for your message. I wrote this code about 13 years ago using a simple HTML book and it was pretty easy back then (I’m not a programmer), but the last couple of hours I’ve tried to learn a little about GitHub/Kinsta and it’s not as easy…lol. Anyway, yes, there’s an index.htm file and it is stored in my GitHub root folder: RMVolleyball (repo owner) / RMVolleyball.github.io (repo name). I’m pretty sure that the problem is something ridiculously basic that I haven’t encountered yet in my reading, but I really appreciate your explanation, especially the link you shared.

Mary

You’re welcome Mary :slight_smile:

OK, if you’re still getting the 404 error with your Static Site, could you please go to your MyKinsta control panel dashboard and see the ID shown there on your browser’s URL bar (look for the random characters after the ?idCompany= , and please copy-paste them here, so we can take a look at it).
Also could you please tell if your GitHub repo is set to private or public?

Best regards,
Agus

Hi Agus,

On the MyKinsta dashboard the ID shown on my browser’s URL bar is b2c4df43-9232-49e0-870e-2db6e12856a3 . Also, my GitHub repo is public.

Thank you.
Mary

Hi Mary,

you should be able to fix the 404 error by renaming your index.htm file to index.html and then wait for MyKinsta to complete the new deployment :+1:

Regards,
Alessandro

That worked!! :clap: :clap: I also edited the appropriate href’s in all my HTML files to reflect the index.html name-change. Verification is pending for my domain rickmclaughlinvolleyball.com, so after that I should be up and running. :sweat: :pray: Thanks for your guidance, Agus and Alessandro.

Mary

1 Like

Just as an aside, we’re checking with our development teams to see about having .htm be considered an index as .html is now.

I’m glad that fixed it for you!

Ahhh…thank you, Jeff. -Mary

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.