General Questions

Can I migrate SEO URLs from WooCommerce to Magento?

Yes, you can migrate SEO URLs from WooCommerce to Magento by selecting the “Migrate categories and products SEO URLs” option during your data migration with Cart2Cart.

How Will My URLs Look After WooCommerce to Magento Data Migration?

Here’s an example of how the “Migrate categories and products SEO URLs” option works in practice when performing a WooCommerce to Magento data migration.

Let's say you have a product named "Hair Spray" in your WooCommerce store with the following URL:

http://woocommerce-store.com/product/hair-spray/

And the URL of its category is:

http://woocommerce-store.com/product-category/hair-care/

WooCommerce product and category URLs before data migration

After migrating to Magento with Cart2Cart (and selecting the “Migrate SEO URLs” option), the "Hair Spray" product URL will look like this:

http://magento-store.com/index.php/hair-spray.html

The URL of its category will be:

http://magento-store.com/index.php/hair-care.html

Magento product and category URLs after WooCommerce data migration

How to Remove the .html Suffix from Magento Product and Category URLs After Data Migration

By default, Magento product and category URLs include the .html suffix. You can remove this suffix through your Magento Admin Panel.

Log in to your Magento Admin Panel and navigate to: Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization.

Magento Search Engine Optimization settings

Delete the .html suffix from the "Product URL Suffix" and "Category URL Suffix" fields, leaving them empty. Save your changes.

Removing .html suffix from Magento URL settings

After making these changes, clear your Magento cache and reindex your data. Refer to these detailed instructions for guidance.

How to Remove /index.php/ from Magento URLs After Data Migration

Magento URLs often contain /index.php/ by default. To remove this, you need to modify your .htaccess file.

Access your Magento root folder via FTP or your hosting file manager and locate the .htaccess file. Open it in a text editor. Check if a block exists. If so, paste the following code immediately after the line containing RewriteBase:

RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

If you can't find the block, paste the following code at the bottom of the .htaccess file:

RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

Afterwards, clear your cache and perform a Magento reindex via SSH.

What to Do if My WooCommerce Products Had /product/ in Their URLs After Data Migration

WooCommerce and Magento use different URL structures. New products created directly in Magento will not include the /product/ segment in their URLs.

To maintain SEO and redirect users from old WooCommerce URLs, you can set up a mass redirect from, for example, http://woocommerce-store.com/product/hair-spray/ to http://magento-store.com/hair-spray for all migrated products. This requires modifying your .htaccess file again.

Locate the .htaccess file in your Magento root folder and open it. Find the line RewriteEngine on. Paste the following code immediately after it:

RewriteCond %{REQUEST_URI} ^/product/[\w-\?\.=]+ RewriteRule ^product/(.*)$ http://magento-store.com/$1 [R=301,L]

If the RewriteEngine on line doesn't exist, add the following code to the bottom of the .htaccess file:

RewriteEngine on RewriteCond %{REQUEST_URI} ^/product/[\w-\?\.=]+ RewriteRule ^product/(.*)$ http://magento-store.com/$1 [R=301,L]

Replace http://magento-store.com/ with your actual Magento store URL. Ensure that “$1” remains at the end of the URL, as shown in the example.

Clear your cache and perform a Magento reindex via SSH after making these changes.

These steps will help preserve search engine rankings and prevent losing referral/direct traffic from old WooCommerce URLs. Customers accessing your products via old WooCommerce URLs (e.g., http://woocommerce-store.com/product/hair-spray) will be redirected to the corresponding new Magento URLs (e.g., http://magento-store.com/hair-spray) without .html or /index.php/.

Ready to migrate your store? Start your free demo now or schedule a call with a migration expert to discuss your project.


Do you need help? Contact our support team

Just set up the migration and choose the entities to move – the service will do the rest.

Try It Free

Delegate the job to the highly-skilled migration experts and get the job done.

Choose Package