Magento Tutorials

Magento: The requested URL was not found on this server


What is “The requested URL / was not found on this server”?

This error normally happens after the installation of your Magento website. When it happens, you’ll see the Not Found page with the message “The requested URL /…/… was not found on this server” on any URL on your website.

magento the requested url was not found on this server

even the admin URL

the requested url was not found on this server

But if you include “index.php” in the URLs, they are accessible again:

Magento index.php

Why does this happen?

This is a problem from Apache server when it is unable to process links without “index.php”.

How to solve it?

You need to setup your Magento so that all links point to index.php file.

By default, this file is included in Magento installation: which already has a configuration part for Apache

apache configuration

To use the Apache configuration form this file, backup the existing .htaccess file in your website, then rename the file .htaccess.sample into .htaccess.

That’s it! Now you can refresh your website to see the result.

Magento 2 homepage

See also: Exception printing is disabled by default for security reasons

Magento: The requested URL was not found on this server
5 (100%) 4 vote[s]


A knowledge craver who always strive to be wiser everyday.


      03/05/2018 at 10:49 am

      RAJU KUMAR SINGH jobs waste

      • Dom
        03/07/2018 at 11:54 pm

        What do you mean, Raju?

    2. rita_Lee
      03/27/2018 at 9:08 am

      Thank you for the solution, it works fine !

      • Dom
        04/03/2018 at 8:30 pm

        Great to hear that, Rita! 🙂

    3. Kenzie
      07/02/2018 at 2:00 pm

      Thanks a lot. you save my day!

      • Dom
        07/05/2018 at 9:46 am

        My pleasure! 🙂

    4. Simeon Petrov
      11/06/2018 at 1:11 am

      What about Nginx?
      The rewrites are working – index.php is not visible, but API calls on the checkout fall with 404 when without index.php…

      • Dom
        11/06/2018 at 10:37 am

        Hi Simeon,
        If you use Nginx, add this to your virtual host file and then reload nginx configuration:

        location / {
        try_files $uri $uri/ /index.php?$query_string;

    5. Vinicius Cunha
      05/18/2019 at 3:00 am

      You just save my life!

      • Dom
        05/20/2019 at 8:56 am

        Glad I can help!

    Leave a Comment

    Your email address will not be published. Required fields are marked*