title: How to deploy a nextjs application on cpanel?
body: <p>I followed these steps to deploy my nextjs on cPanel.</p>
  
  <ol>
  <li><p>go to package.json and add this line: <code>"homepage": "http://afsanefadaei.ir"</code></p></li>
  <li><p>run <code>next build</code> to have <code>.next</code> folder as my build folder</p></li>
  <li><p>go to <code>cpanel  &gt;&gt; file manager &gt;&gt; public_html</code> folder and upload the contetn of <code>.next</code> folder to this directory</p></li>
  <li><p>add or edit this file: <code>.htaccess</code> to:</p>
  
  <p><a href="https://i.stack.imgur.com/JqhRA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JqhRA.png" alt="enter image description here"></a></p></li>
  </ol>
  
  <p>but when I go to the website I face this:</p>
  
  <p><a href="https://i.stack.imgur.com/9iCaU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9iCaU.png" alt="enter image description here"></a></p>
  
  <p>Do you know what is wrong with this?</p>