I have some of the products already added in magento admin. And now i am trying to create same name product with the use of script that time i am facing error "URL key for specified store already exists". Why it is not taking as per magento rule? Have anyone idea about that?

If i set like below then i can easily save product.

$url_key = $productName."-".rand(1,100);

But above way is not proper for SEO perspective.

If we create same name product from admin then URL will automatically create even if the product name is already exist in other products.

Any suggestions please?

1 Answer 1


You can create multiple products with the same name, but your SKU must be unique. Magento differentiate products based on SKU

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.