I followed these steps to deploy my nextjs on cPanel.
go to package.json and add this line: "homepage": "http://afsanefadaei.ir"
run next build
to have .next
folder as my build folder
go to cpanel >> file manager >> public_html
folder and upload the contetn of .next
folder to this directory
add or edit this file: .htaccess
to:
but when I go to the website I face this:
Do you know what is wrong with this?
.next
doesn't have index.html file.next export
instead of next build
if you tend to have frontend side only.But the most important thing is number 1, make sure you have index.html
inside your .next
folder.