Magento CMS hompage 404 page not found 1

Magento CMS hompage 404 page not found 1

September 6, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento CMS hompage 404 page not found 1

Magento CMS Homepage Not Found Error: Resolving the Mystery

You’re not alone if you’ve found yourself scratching your head over Magento’s infamous “404 Not Found” error when trying to set up a custom homepage using the CMS page feature. This issue is quite common among Magento users, especially those maintaining multiple stores from a single installation.

The Problem: URL Key vs Default Web URL

Let’s start by understanding where things might be going wrong in your configuration. You’ve done most of the heavy lifting correctly:

  • You created a new CMS page with a title and URL key.
  • You set up your store view for the page.
  • In System Configuration, you specified the correct CMS Home Page.

However, there seems to be a discrepancy between what you’re setting as the Default Web URL (which is just “d2-home”) and how Magento actually processes URLs. The issue likely lies in how Magento interprets this value for the homepage.

When you set the Default Web URL to “d2-home”, it expects that to represent the base URL path of your store, not just a relative path like /d2-home. This is why when you navigate directly to domain-2.com/d2-home, the page loads fine - because you’re providing the full relative path.

The Solution: Reconfigure Your Base URLs

To resolve this issue, we need to update our Magento base URL configuration to include the protocol (http:// or https://) and the trailing slash. Here’s how to do it:

  1. Go to System -> Configuration.

  2. Select the store view you’re working with under the Current Configuration Scope dropdown at the top left.

  3. Under General, find Web. Click on Default Web URL.

  4. Change the value from “d2-home” to something like “https://domain-2.com/”. Make sure to include the trailing slash (/).

  5. You might also want to update the Base Skin URL and Media Base URL fields while you’re at it, ensuring they match the new base URL format.

  6. Click Save Config.

After making this change, Magento should be able to correctly process requests for your custom CMS homepage without throwing a 404 error.

Understanding Apache Configuration

Your current .htaccess file looks correct from an Apache configuration perspective. The SetEnvIf directives are properly setting the MAGE_RUN_CODE and MAGE_RUN_TYPE environment variables based on the hostname, which allows Magento to route requests appropriately between your two stores.

Remember that after making any changes to your Magento core files or configuration, it’s always a good idea to clear the cache (System -> Cache Management) to ensure the updates take effect.

Conclusion

The key learning here is understanding how Magento interprets base URLs for its homepage. Ensuring the Default Web URL includes the protocol and trailing slash prevents Magento from getting confused when trying to locate your custom CMS page.

If you’re still struggling with this issue or need further assistance, feel free to reach out to our team at Laravel Company for professional Magento development services and support.

Don’t let this technical hiccup hold back your e-commerce growth. With the right configuration and a bit of troubleshooting, you’ll soon have your custom CMS homepage up and running perfectly.

Configuration Errors

Our network