Magento Out of stock product SEO - magento

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

Related

Magento 2 URL Rewrites

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

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.

Use Categories in Product URLs for ALL Urls - Magento

Systeam creates two URLs for one product:
http://www.website.com/shirt/white-collar-shirt
http://www.website.com/white-collar-shirt
I want only one URL with category in it....
In our store we not have many products - 30 or so. Is good idea to redirect with .htaccess ?
Redirect 301 "/white-collar-shirt" website.co.uk//shirts/white-collar-shirt
How do I achieve that?
It's bad idea to use .htaccess, because you'll have to make changes to it every time you change url key of product or add new one.
It's not a simple task, one of way to achieve it, is to create custom extension which will create url rewrites for products to url with category.
Another way if it's suitable for you is just set in configuration "Catalog > Search Engine Optimizations > Use Canonical Link Meta Tag For Products" and search engines will store url for that product as one for both url, but it will be url without category. It's easier to develop.

Magento 2 stores with different product url

Here is my situation, my company buy product with no brand and sell them in its own brand.
We have 2 websites and 2 brands, some products exist in both of our brand with different name.
Example : product A of brand A named BrandA Product Premium and the same product on the other site is named BrandB Product Super.
But on both website the url-key is the same (the name of the product in the default view) so on site1 I have :
http://www.site1.com/brand-a-product-premium.html that is very good.
On site2 I have http://www.site2.com/brand-a-product-premium.html If you type in the correct url : http://www.site2.com/brand-b-product-super.html you are redirected to the bad url.
I can correct this by creating a custom url_rewrite, but there are thousands of product in this case, so I may have done something wrong and there should be a better solution for this.
May I have some help ?
Best regards.
If you are using one instance of Magento in a multistore setup you can override the url key as well as any other product attribute for each store view. Select the store view for site 2 from the dropdown on the left hand side of the edit product page and then override the required fields for that store view.
I have a multistore site where I sell some products on both but not all and using the above method gives me full control over every aspect of the same product for each store view. e.g. Custom name, description, images, categories etc. To ensure that a product is not shown on a particular site via catalog or search, I disable that product in that store view by setting visibility to none.
Do not use the URL rewrite option this will come back to haunt you!

magento show "Sign up to get notified when this product is back in stock" link for simple-associated products

How can we display the "Sign up to get notified when this product is back in stock" link for associated products of a configurable product.
Say, we have a T-Shirt (a configurable product) and we sell it in 3 sizes - Medium, Large and Xtra-Large (simple - associated products).
When the Large size goes out of stock, how can we make user subscribe for it for notification when it is back in stock.
Please note I have already set this setting in admin:
System > Configuration > Catalog > Allow Alert When Product Comes Back in Stock - Yes
I noticed that the url for this alert is like (it is for one of the simple products in my store):
http://localhost/mystore/index.php/productalert/add/stock/product_id/1/[some key]/[some key],,/
Is there any way we can call this url directly, passing the product id of our associated product in question? If so, what about those keys at the end of the url?
please guide.
thanks
I added this link beside the out-of-stock associated product:
http://localhost/mysite/index.php/productalert/add/stock/product_id/[associated_product_id]/uenc/[any_key]/
For e.g.
http://localhost/mysite/index.php/productalert/add/stock/product_id/17/uenc/MTM0MzcyMDk0Mw==/
It does my job.
Only thing is, after successfully adding the alert record, it redirects to home page, instead of same page as in normal case.
This is due to [any_key], if we could somehow encrypt current page url [the any_key] just like magento does, we can have it redirect to same page also, after successful saving of alert record.
Any ideas?
Thanks
Ok I got it finally!
The uenc key [any_key] is actually base64 encoding of current url.
So with the help of https://github.com/carlo/jquery-base64, I did:
var encodedUrl = $.base64.encode(window.location);
var redirectTo = 'http://localhost/mysite/index.php/productalert/add/stock/product_id/[associated_product_id]/uenc/' + encodedUrl + '/';
Hope this helps!
The Magento way to get the url would be:
Mage::helper('productalert')->setProduct($_product)->getSaveUrl('stock')
Magento already avails the functionality to set out of stock from admin panel, unfortunately it is limited to some instances therefore we can not set this from admin panel, either way you can do it in code as above mentioned but its a manual task and can not be done again and again with links.
So i think its better to use ready made extension in case you have specific requirement to set product stock alert functionality for customer and they can subscribe for it.
Here is the well managed extension for Magento 2 which can help you to set Product alert and sign-up / subscription functionality with many more admin manageable features.
Link to Out of stock notification extension for Magento 2 - https://www.mconnectmedia.com/out-of-stock-alert-magento2.html

Resources