For my multi-lingual-Page (de + en) I've made a 404.html-File in my templates-Folder with a language-changer for html-content-output like

{% if craft.app.language == 'de-CH' %}<p>Hallo</p> {% else %} <p>Hello</p> {% endif %} 

When I open the 404-pages local (localhost/404 and localhost/en/404) it works. Also when I open them in live with direct url (www.example.ch/404 and www.example.ch/en/404) everything works fine.

But when I will open a wrong URL like "www.example.ch/tesxt" (correct URL: www.example.ch/test) I get a HTTP 404 – Not Found – yii\web\NotFoundHttpException Template not found: tesxt


  • I only have one index.php
  • I only have one 404.html
  • in general.php: 'devMode' => false,
  • the 404.html is directly in templates-Folder (src>templates>404.html)
  • installed Plugins: DigitalOcean Spaces Volume, Freeform, Redactor (I think these will not disturb the 404 page)
  • Craft Version: 3.5.17
  • PHP-Version: 7.3.17

1 Answer 1


I don't know exactly why. But I did the Redactor updates in Craft, uploaded the new vendor folder to the hosting provider and now it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.