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: https://github.com/magento/magento2/blob/2.4-develop/.htaccess.sample 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

Dom

A knowledge craver who always strive to be wiser everyday.

Subscribe
Notify of
guest

15 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Kenzie
5 years ago

Thanks a lot. you save my day!

Simeon Petrov
Simeon Petrov
5 years ago

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…

Vinicius Cunha
4 years ago

You just save my life!

Anoop
Anoop
2 years ago

The requested URL was not found on this server.” issue with the above solution was not helpful for me. Please suggest me the solution in a video is possible.
Thank you.

Osh University
1 month ago

Osh University’s  Medical faculty  is dedicated to providing advanced training and education for healthcare professionals, equipping them for excellence in their fields.

Shalamar Hospital
1 month ago

Shalamar Hospital is your reliable  emergency hospital , equipped to handle critical medical situations. Trust us for immediate, expert care in times of need.

Jewel Galore
1 month ago

Explore Jewelgalore exquisite  ladies ring design . Each piece reflects unique craftsmanship and elegance, perfect for adding a touch of sophistication to your style.

RAJU KUMAR SINGH
RAJU KUMAR SINGH
6 years ago

RAJU KUMAR SINGH jobs waste

rita_Lee
rita_Lee
5 years ago

Thank you for the solution, it works fine !

Kislay
4 years ago

Hi,

All my menu links on my magento 1.9 site https://www.artsofindia.in/ are giving the below error:

Not Found
The requested URL /home-decor-products-arts-of-india was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at http://www.artsofindia.in Port 443

Please help.