Magento 2 URL Not found after installation

Magento 2 URL Not found after installation

September 7, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento 2 URL Not found after installation

Solving Magento 2 URL Not Found Issues After Installation

Magento is a powerful e-commerce platform, but it’s not uncommon for developers to face issues like the “page not found” error immediately after installation. In this post, we’ll troubleshoot and resolve one of the most common Magento 2 URL not found errors.

Understanding the Error

The “404 Not Found” error typically occurs when Magento cannot locate the requested page or resource on your server. This could be due to incorrect configuration settings, corrupted files during installation, or missing dependencies.

Let’s break down the steps you’ve tried and then explore the root causes of this issue.

Your Initial Troubleshooting Attempts

You’ve already performed several standard troubleshooting steps:

  1. Clearing Magento cache with bin/magento cache:clean helps resolve many minor issues, but it couldn’t fix your problem.
  2. Compiling static assets is a best practice in Magento development, ensuring all CSS and JavaScript files are properly generated.
  3. Enabling developer mode is useful for debugging purposes, allowing you to see error messages instead of generic “not found” pages.

While these steps typically resolve many common issues, the error persists in your case.

The Root Causes

There could be several reasons why a brand new Magento installation still shows the 404 Not Found error:

  1. Incorrect Base URL: During installation, you might have configured the base URLs incorrectly or not at all. Magento needs to know where its home is on the web.
  2. Missing or Corrupted Files: If any of the core Magento files were corrupted during extraction or upload, it can cause the site to break.
  3. Permissions Issues: Incorrect file permissions can prevent Magento from accessing necessary resources.

Step-by-Step Solution

Let’s address each potential issue systematically:

1. Verify and Correct Base URLs

Open your web browser and navigate to http://yourdomain.com. Replace “yourdomain.com” with the actual domain you used during installation.

Look at the top of the page, near the title. You should see something like “Magento Commerce - Admin Panel.” If it says this instead of showing an error message, then your base URLs are correctly configured.

If you see a different message or only a blank white screen, open the file app/etc/env.php in a text editor and check if the base_url and base_secure_url fields match your actual domain. Update them if needed:

return [
    'install' => [
        'date' => 'Tue, 01 Jan 2018 00:00:00 +0000'
    ],
    ...
    'base_url' => 'http://yourdomain.com/',
    'base_secure_url' => 'https://yourdomain.com/',
    ...
];

2. Check for Corrupted Files

Use the Magento file system inspection tool to check for any missing or corrupted files: php bin/magento setup:di:compile.

If this command fails, it suggests a problem with your Magento installation files.

3. Verify File Permissions

Ensure all Magento files have proper permissions:

  1. Change owner to the web server user (usually www-data): chown -R www-data .
  2. Set file permissions recursively: find /var/www/html/magento/ -type f -exec chmod 644 {} \; && find /var/www/html/magento/ -type d -exec chmod 755 {} \;

Final Steps

After updating your base URLs and verifying files, run the following commands:

php bin/magento cache:clean
php bin/magento setup:upgrade

If you’re still seeing the error, try running php bin/magento cache:flush to clear all cache types.

Conclusion

In most cases, correcting the base URLs and ensuring proper file permissions resolve the “404 Not Found” issue in a fresh Magento installation. If these steps don’t work, consider checking your server logs (access.log) for more specific errors or contact our support team at Laravel Company.

Remember, maintaining proper file permissions and regular backups are crucial best practices while working with Magento.

Let us know in the comments if this solution helped you resolve your issue.

Magento 2 Cache Themes Configuration

Our network