Hello Magento Folks,

What are you all doing? In this tutorial, we will learn How to Configure Store URLs in Magento 2? Boost your online store with the help of our last post where I have elaborated 7 Easy Rules to Write Product Descriptions That Sell. Let’s get over with today’s topic.

Quick Intro:

Basically, when you install Magento then the Magento store has a base URL that is allocated to the frontend of that particular store. And one more URL is allocated to the admin. In Magento, there is the utilization of the variables that are utilized to define the internal links connected to the base URL. With this, the main benefit is when the whole store is moved from one location to another then there is no need of updating all the links. Basic base URLs start with HTTP and the secure base URLs start with HTTPS. 

Mainly, there are 3 types of URLs. Mostly, all should have precise knowledge of the store URLs and all types of URLs required in development. Check out our previous blog How To Add URL Rewrite In Magento 2.

Base URL
http:// www.abc.com/magento/
Secure Base URL
https:// www.abc.com/magento/
URL with IP address
http:// ###.###.###.###/magento/

Steps to Configure Store URLs in Magento 2:

How to configure Base URL?

Configure the Base URL

Step 1: Navigate to Stores>Settings>Configuration
Tap on Web below the general option and explore the Base URL section.

Base URL: Add the URL of your Magento 2 store here, mostly the URL requires to close it with the forward slash. If you require to extend the link then one can do it by adding the URL.

Example: http://abc.com

Base Link URL: There is already a placeholder link. This is utilized to make relative links. 

Base URL for Static View Files: For the store admin if they require to create substitute location mainly optionally.

{{unsecure_base_url}}

Base URL for User Media Files: For the store admin if they require to create substitute location mainly optionally.

{{unsecure_base_url}}

base url

Save Configuration.

Insert the store code in URLs

Step 1: Navigate to Stores>Settings>Configuration
Tap on Web below the general option and explore the URL options.

Add to Store to URLs: Select as per your requirement.

URL with Store Code:
http://www.abc.com/magento/store-view/index.php/urlidentifier
URL without Store Code:
http://www.abc.com/magento/index.php/url-identifier

store code

How to configure Secure Base URL?

Step 1: Explore the Secure Base URL option.

Secure Base URL: Add the URL of your Magento 2 store here, mostly the URL requires you to close it with the forward slash. If you require to extend the link then one can do it by adding the URL.

Example: https://abc.com

Secure Base Link URL: There is already a placeholder link. This is utilized to make relative links.
Secure Base URL for Static View Files: For the store admin if they require to create substitute location mainly optionally.
Secure Base URL for User Media Files: For the store admin if they require to create substitute location mainly optionally.
Use Secure URLs on Storefront: Select YES if you require to operate the whole store in a secure (HTTPS) channel.
Use Secure URLs in Admin: Select YES if you require to operate the whole admin in a secure (HTTPS) channel.

secure base url

Save the Configuration.

That’s It

Conclusion:

Hopefully, all the Magento Developers are able to Configure Store URLs in Magento 2 using the above guide. Also, you can use Magento Multi-Store & Website Setup Service for creating your online Magento Store. If you feel any difficulties with the above solution then let me know in the comment box. 

Share it with your friends.

Happy Reading

[Total: 4   Average: 5/5]