Back to Top

The requested URL was not found on this server Magento2

Updated 5 August 2022

In this blog I will guide you how to resolve “The requested URL was not found” issue.

Today I face an issue in my Ubuntu 18.0.4 environment when I was trying to install Magento2 by following all the steps mentioned inside the Magento2 installation Guide.

After following all the steps Magento2 has been successfully installed on my environment.


But when I tried to open admin URL for Magento2 then I face “The requested URL was not found on this server” but there is no issue with the store URL.


Then a bit searching, I found few solutions and I tried all the solutions one by one.

Start your headless eCommerce
Find out More

So here I am sharing all the solutions one by one.

Solution 1

You can try to access your Magento admin using “” instead of ““. In order to resolve “”The requested URL was not found on this server“”

Solution 2

If solution 1 will not work for you then you can enable rewrite on web server.

For Apache web server users

Open the Apache virtual host file which is present inside the “/etc/apache2/sites-enabled/000-default.conf” or “/etc/apache2/acache2.conf” then replace the below line from,

<Directory /var/www/html>
      Options Indexes FollowSymLinks
      AllowOverride None
      Require all granted

To (replace the “AllowOverride None” line with “AllowOverride All“)

<Directory /var/www/html>
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted

It will enable “mod_rewrite” for apache web server but if you are a Ubuntu user then you can use below command,

a2enmod rewrite

Then after following above steps you can restart your Apache web server.

service apache2 restart
/etc/init.d/apache2 restart

For Nginx web server users

Open the config file of your Nginx web server. You can find your file inside the “/etc/nginx/sites-enabled/yourdomain

server {
       index index.php;
       if ($request_uri ~* "^(.*/)index.php$") {
            return 301 $1;

After making these changes your needs to restart your Nginx web server.

service nginx restart
/etc/init.d/nginx restart

Solution 3

If solutions 1 & 2 will not work for you and you are Apache web server user then you can try this solution as well.

Check your “.htaccess” file inside the Magento root directory. If that file is not present then you can create that file with the required definition or you can replace the “.htaccess.sample” with the “.htaccess“.

Or if that file is present then you can check these lines are correct or not inside the “.htaccess” file


This is how you fix this issue and you will be able to successfully login your Magento.

You can also check some other informative blogs

We Would Love to Hear From You!

Hope you find the blog informative! Please feel free to share your feedback in the comments below.

If you still have any issues/queries then please raise a ticket at

For any doubt contact us at [email protected].

Thanks for paying attention!!

🙂 😊

. . .

Leave a Comment

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

Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home