> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.weltpixel.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How To Add Store Code To URLs In Magento 2

Adding the store code to URLs in Magento 2 can be very useful for multi-language setups. This way, customers know exactly which version of the store they're browsing. For example, if you have English and French Store Views, URLs will look like this:

* [https://mystore.com/en](https://mystore.com/en)
* [https://mystore.com/fr](https://mystore.com/fr)

---

### 1. Enable Store Code in URL Options

To show the store code in your store’s URLs:

1. Head into **Admin -> Stores -> Configuration -> Web**  
2. Expand the **URL Options** tab  
3. Uncheck **Use System Value**  
4. Set **Add Store Code to URLs** to **Yes**

![Magento 2 add store code to URLs](https://storage.crisp.chat/users/helpdesk/website/-/e/d/d/f/eddf5f8538915800/4e699c50-45ed-476e-9db1-ccac9f_zsqgm5.png)

---

### 2. Save and Flush Cache

After making this change:  
- Click **Save Config**  
- Flush the Magento Cache from **Cache Management**  
- Reload the frontend to confirm the store code is now included in URLs

---

### 3. Find Your Store Code

If you’re unsure of the store code for a Store View:  

1. Navigate to **Stores -> Settings -> All Stores**  
2. Check the **Code** column under the **Store/Store View** name  

![Magento 2 check store view code](https://storage.crisp.chat/users/helpdesk/website/-/5/c/9/3/5c93b9393a8d9800/1990d81c-5aba-4809-8a91-3ff6c6_f2ugng.png)

---

✅ That’s it! Now your Magento 2 store will display the store code directly in the URL, making it clear which language or store view your customers are browsing.