Magento 2 URL Rewrites - magento

I have recently moved my store over to Magento 2. The store is up and running and all is good. I've just noticed that for most products, Magento 2 has created 3 different URL's for the same product.
If for instance, the product is located in Category A > Sub Category B. The following URL's are created;
mystore.com/product.html,
mystore.com/categorya/product.html,
mystore.com/categorya/subcategoryb/product.html
I think this will end up being a problem for search engines, as its going to result in a fair bit of duplicate content.
Ideally I'd like to just keep the;
mystore.com/categorya/subcategoryb/product.html
url, how can I stop Magento from rewriting the other 2 urls, whilst making sure links still work from all pages.
It's worth mentioning, that if I visit the product from a home page link, it uses the mystore.com/product.html url. Whilst if I visit the product from the Category A page, it uses the mystore.com/categorya/product.html url. Similar if I click a link in the subcategory.

you can use default magento settings by stores->configuration -> Search Engine Optimization -> Use Categories Path for Product URLs -> 'yes'
If this can solve your problem

Related

How to solve duplicate content issues in Magento?

On magento Site that i am working on certain products have minor changes in the product setup, except the product description.How do i solve the duplicate content issue without creating variable product?
Canonicalization may be your best bet. This tells search engines which version of the page you want to be indexed.
For example:
If you have /productCategory/product001 as well as /newProducts/product001 you would want to add <link rel=”canonical” href=”http://www.domain.com/productCategory/product001”> to the new product page to tell search engines to give all ranking authority to the new product page to the actual page for that product.
This product will still rank, you're just going to be showing users the product under its category rather than the product under the new products page.

How is it possible that Magento create SEO Links for products ONLY WITH the category

The problem:
Magento creates 2 SEO Links for a product like this:
product/1695/60 category/category2/productname catalog/product/view/id/1695/category/60
and for the same product:
product/1695 productname catalog/product/view/id/1695
the first is a link with the category, and the second is without but only with the productname.
But what I want is that magento creates only ONE Seo Link in fact this link WITH the category, and not this link without the category.
The question:
How is it possible that Magento create SEO Links for products ONLY WITH the category?
I search in the admin menu and the only thing what I find is the option "use categorypath for article urls". But if I choose "YES" in this option And I rebuild the indexes I got 2 SEO Link for my article.. one without the category, and one with the categorypath.
Can somebody help me?
Thanks!
Yes, it is a common problem with Magento. You do have 2 options to create the result you want:
(harder one), you truncate table core_url_rewrite and reindex
database with "use category path to product urls" set to no. If this
is a live site you will have to create a redirect tool to point users
to correct pages. I recommend the extension I've created
https://github.com/SnowdogApps/Snowdog_Error404toolsm, it is for
redirects :-)
use this extension https://amasty.com/magento-unique-product-url.html , easy to install and get the job done

Magento homepage site title for 11 different websites

I have a multi-store Magento installation for 11 different domains all selling the same product but targeting different countries, currencies and languages.
I have one CMS homepage at the moment set with content being pulled in with static blocks and a featured category. The title for all 11 websites is 'Home Page' in english.
I want to be able to change the meta title of each site, is there a way I can do this without having to create 11 separate CMS homepages in the admin and then assigning each website to it's specific CMS page? It seems overkill to have to create a separate page to change just change one line on each website.
The title, meta-keywords and meta-description are added to the page from here: Mage_Cms_Block_Page::_prepareLayout(), to be more exact, on these lines:
if ($head) {
$head->setTitle($page->getTitle());
$head->setKeywords($page->getMetaKeywords());
$head->setDescription($page->getMetaDescription());
}
I see here 2 quick options:
You override the method mentioned above and replace $head->setTitle($page->getTitle()) with $head->setTitle($this->__($page->getTitle())) and add to your translation files the translation of Home page for every language.
You override the method Mage_Cms_Model_Page::getTitle() and make it return a translated version of the title then again add Home page to your translation files.
I recommend the first option.
If you have 11 sites all selling the same item, duplicate content could very well become an issue, especially if you are dealing with hundreds+ skus. I would suggest doing the individual CMS pages like you first suggested and change more than just the META data.
Also, in System>Configuration>Design, you can change the Title Prefix and Suffix and default info per site so that may help as well.

How to split (A/B) test Magento product pages

I want to test different variations of product pages/layouts that I set up on Magento. It would be simple with a CMS page - but one cannot just create a new product. Customers should be able to buy exactly the same product, but enter on different pages.
NB: The google website optimizer thing (which I could never get working anyway) is apparantly dead now, replaced by content experiments via Google Analytics.
CMS pages are simple A/B whereas product pages are multivariate. That means you get something ridiculous like 32 recipes for a product if you go and setup different descriptions, titles, pictures and whatever else. It all works just fine in 1.7 but there is some effort needed to follow the screencasts, test and tinker.
If you want A/B for products consider setting up two stores/website views in the backend, e.g. 'store A' and 'store B'. Now edit the index.php and set the store code to 'A' for people with even IP addresses and 'B' for people with odd IP addresses:
$mageRunCode=(ip2long(1 & $_SERVER['REMOTE_ADDR']) ? 'A' : 'B')
Consider testing the layout change for only one product. The normal product page will be your control page (page "A")
If the price on the control page doesn't get updated frequently, simply create the challenger page (page B) as a static page somewhere on your server.
After you've done that setup the experiment in Analytics, add the experiment code to page A and you're done.

Magento Out of stock product SEO

I hope many of you gone through this issue/problem.
When we setup magento store with 1000 products. Each will hold a unique URL, and when its gets scraped by google(search engines) then the product always should be in-stock if not then magento store will return 404 page.
For example:
www.magestore/unique-url.html
This gets daily 100's of hits towards site even the product was out of stock and not able to view in store so its returning 404.
Solution
URL rewrite is the solution that's what am trying daily, but if the products getting out of date is really high and cant able to do rewrite means then in most of points loosing SEO hits which leads to 404.
If I enable Out of stock visibility true then the product list also included the out of stock items, but I don't need that,need only direct URL Access.
Am sure, many of you could solved it, please tell me a way to show these products only on direct URL Access but not in the regular product list view page.
Thanks
Enable Out Of stock visibility and have your extension redirect all out of stock items to wherever you redirecting those now

Resources