Cookies setting

Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy

Cookie Policy
Essential cookies

These cookies are strictly necessary for the site to work and may not be disabled.

Information
Always enabled
Advertising cookies

Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.

Information
Analytics cookies

Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.

Information
mageplaza.com

How to Configure Store URLs in Magento 2

Vinh Jacker | 06-28-2016

Configure Store URLs

Every Magento store has a base URL and another admin URL. Configuring Store URLs in Magento 2 enables you to easily move the whole store to another location without having to update all of the URLs. Hence, understanding exactly about the configuration of store URLs as well as all types of URLs is necessary for you in developing a Magento 2 store. There are 3 types of URL, for example:

Base URL

http:// www.yourdomain. com/magento/

Secure Base URL

https:// www.yourdomain .com/magento/

URL with IP address

http:// ###.###.###.###/magento/

Your default Magento site owns a base URL and an Admin URL assigned to storefront and storeback respectively. If you plan to have multiple stores, you should include the store code in the URL.

Following the guide given below to create the Store URL for your own Magento 2 store.

To Configure Store URLs in Magento 2

Configure the Base URL

  • On the Admin Panel, Stores > Settings > Configuration.
  • On the left panel, under General, select Web.
  • Open the Base URL section,
    • Fill the Base URL for the store, however, the URL needs to end with a forward slash to extend the link with the additional URL later. For example,
http:// yourdomain.com

In the Base Link URL field, the placeholder link is available and used to create relative links to the base URL. Don’t edit it!

  • It is optional if you want to create an alternate location of the Base URL for Static View Files, for example:
{{unsecure_base_url}}
  • It is optional if you want to create an alternative location of the Base URL for User Media Files, for example:
{{unsecure_base_url}}

How to Configure Store URLs Base URLs

  • Save Config to complete.

Insert the store code in URLs

  • On the Admin Panel, System > Settings > Configuration.
  • On the left panel, under General, select Web.
  • Open the URL Options section:
  • Choose Yes in the Add Store Code as you need.
    • URL with Store Code
http://www. yourdomain.com/magento/store-view/index.php/urlidentifier
  • URL without Store Code
http://www. yourdomain.com/magento/index.php/url-identifier

How to Configure Store URLs URL Options

  • Click Save Config to complete.
  • When prompted, click on Cache Management link to flush the cache.

Configure the secure Base URL

  • Open the Base URL (Secure) section,
    • Fill the full Secure Base URL and the end character is a forward slash. For example:
http:// yourdomain.com
  • In the Secure Base Link URL field, the placeholder link is available and used to create relative links to the base URL. Don’t edit it!
  • It is optional if you want to create an alternative location of the Secure Base URL for Static View Files, for example:
  • It is optional if you want to create an alternative location of the Secure Base URL for User Media Files, for example:
  • In the Use Secure URLs in Frontend, choose Yes if you want to run the entire storefront over a secure (https) channel.
  • In the Use Secure URLs in Admin, choose Yes if you want to run the entire admin over a secure (https) channel.

How to Configure Store URLs URL Options

  • Click Save Config to complete.

Store URLs configuration needs to be done to solve the store moving problem. Once you have completed these settings, you can be rest assured that the store links are always updated. Thanks for reading, and good luck setting things up! Drop your comments below so that we can discuss further, just in case!

Related Topics:

x
    Jacker

    With over a decade of experience crafting innovative tech solutions for ecommerce businesses built on Magento, Jacker is the mastermind behind our secure and well-functioned extensions. With his expertise in building user-friendly interfaces and robust back-end systems, Mageplaza was able to deliver exceptional Magento solutions and services for over 122K+ customers around the world.



    Related Post

    Website Support
    & Maintenance Services

    Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

    Get Started
    mageplaza services