Canonical URLs
For SEO purposes, is a good idea that each of your web pages has only one, distinct URL.
If you have a single page accessible by multiple URLs, or different pages with similar content, Google sees these as duplicate versions of the same page. Google chooses one URL as the canonical version and crawl that, and all other URLs are considered duplicate URLs and are crawled less often.
If you don’t explicitly tell Google which URL is canonical, it makes the choice for you, or might consider them both of equal weight. This could lead to unwanted behavior, and runs the risk of an ineffective crawl budget and low distributed backlinks.
Depending on how you set up your website, there may be multiple versions of your site in the index, including:
https://www.example.com
https://www.example.com/
http://www.example.com
https://example.com
https://www.example.com/index.html
To specify a canonical page, see Google Search Central documentation.
Configure URL rewrites
Enabling Web Server Apache Rewrites is part of the initial Commerce setup. Commerce routinely uses URL rewrites to remove the file name index.php
that normally appears in the URL just after the root folder. When Web Server Rewrites are enabled, the system rewrites each URL to omit index.php
. The rewrite removes words that convey nothing of value to search engines or customers, and has no impact on performance or site rank.
URL without Web Server Rewrite
http://www.yourdomain.com/magento/index.php/storeview/url-identifier
URL with Web Server Rewrite
http://www.yourdomain.com/magento/storeview/url-identifier
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel where General is expanded, choose Web.
-
Expand
-
Set Use Web Server Rewrites to your preference.
-
When complete, click Save Config.