What is the difference between base url and base link url?

What is the difference between base url and base link url?

August 15, 2026 · Illustrated author avatarBy Stefan Bogdanescu
What is the difference between base url and base link url?

Understanding Base URL vs Base Link URL in Magento

When configuring your Magento store for a live domain, you’ll often see two fields - Base URL and Base Link URL. Though they sound similar, these two serve distinct purposes in your e-commerce setup.

The role of Base URL

The Base URL field is where you specify the primary domain or subdomain where your Magento site resides. This URL is used for the following:

  1. Internal Links: When you create links within your store (like product pages, category pages), Magento uses this base URL to generate the absolute URLs.

  2. API Endpoints: If you’re using Magento’s APIs for integration, the base URL helps in constructing the API endpoints correctly.

  3. Asset Paths: This URL is also used to resolve paths for CSS, JS, and other media files referenced within your theme.

The Base Link URL field is primarily used when you need to generate URLs that are relative to the root domain. Here’s why it matters:

  1. SEO Considerations: If your site has multiple domains or subdomains, using a base link URL ensures that all links point back to the main domain for better SEO performance.

  2. Security and Performance: Relative paths improve security by reducing the risk of unauthorized access through direct linking to resources. They also enhance performance because browsers don’t need to resolve absolute URLs for every request.

You typically set a base link URL when your site is:

  • Hosted on a subdomain
  • Accessible via different domains (e.g., www and non-www versions)
  • Requiring relative links for integration with other systems or third-party services

For example, if your store is hosted at stores.example.com but you want all your product links to appear as example.com/stores/products, you would set the Base URL to https://stores.example.com and the Base Link URL to https://example.com/stores.

Best Practices

  1. Keep the Base URL field updated with the actual domain where your site is hosted.
  2. Use the Base Link URL only when needed for relative linking or integration purposes.
  3. Always test your URLs after making changes to ensure they’re working correctly.

Remember, consistency in your URL structure is key for a smooth user experience and optimal SEO performance. If you need expert help with Magento store configuration, feel free to reach out to our team at Laravel Company.

Conclusion

While both fields serve as URLs, the Base URL is used for absolute path resolution within your site’s internal structure and operations. The Base Link URL, on the other hand, comes into play when you want to generate relative paths for specific use cases like external integrations or multi-domain setups.

Understanding this distinction helps in maintaining a clean, secure, and efficient Magento store for your customers.

Catalog Performance Security API

Our network