This article provides a workaround for the issue when you are not able to save contact as a URL key (e.g., “/contact”) for products or CMS pages.
Adobe Commerce (all deployment methods) 2.4.x
You cannot save a product or a CMS page using the term contact as the URL key. When you try to save the URL key, you receive an error that indicates that the URL key is a duplicate URL.
Steps to reproduce:
Create a CMS page with contact as the URL key.
Expected result:
The page is saved with contact as the URL key.
Actual result:
You cannot save the page. You get the error: The value specified in the URL Key field would generate a URL that already exists.
Contact is a reserved word defined in vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml
.
<router id="standard">
<route id="contact" frontName="contact">
<module name="Magento_Contact" />
</route>
</router>
You cannot use the term contact as your URL key, however, you can use the term contact combined with another letter or number (for example, contact1 and contact2). Although the term does not have to be contact+<another number or letter>, the term could be any string as long as the length does not exceed 255 characters.
Perform the following steps: