Developer forum

Forum » Development » SEO URLs and teardown import

SEO URLs and teardown import

Mikkel Høst
Reply

Hello.
I have a problem with a DW 8.0.0.2 Solution.
We have a teardown import running every day, importing products etc. into Dynamicweb. The problem is that many of the products have the same name, and therefor DW rewrites the URL’s to “productname-1” etc. This is fine, but due to the nature of teardown we can’t be sure that the products get the same “-x” each time.
So now we have URL’s on Google, newsletters, customer mails etc, that point to an incorrect “version” of the product.
Please note that these prodcuts are NOT variants, so I can’t use the variant option.
Does anybody know how I can make sure that these products get the same URL with a teardown approach?
 

Thanks!

 


Replies

 
Martin Nielsen
Reply

And the import cannot generate a unique SEO url, that you can set?

 

 

Maybe productname - productnumber?

 

eg.:

product-name-9994

product-name-9995

 

I wouldn't trust DW to generate the unique URL's for me.

What we've done in our imports, is to set the Meta.Url field on our products to something unique when we import.

 

// Martin

 
Mikkel Høst
Reply

 

Hi Martin.
It’s defiantly an option I have considered and thanks for the input. But my main concern about this approach is that I would have to alter all URL’s on the site and therefor lose all the link juice already present on the current URL’s
Just tested, and DW still can resolve the old “old” url, when I provide a meta url. The only problem here is we now have dublicated content.
Can I in some way make DW always use the meta url? Or at least make DW insert canonical tag on all other URLs than the meta url?

 

 

 
Martin Nielsen
Reply

Dynamicweb will always use the meta url, if it's defined, so doing meta.url = product.name in your import would force DW to always use meta url for product links.

 

This of course might worsen your situation since you then would have defined non unique meta urls on some of your products, and i'm not sure how DW will handle that.

 

Depending on how custom your import is, you might be able to detect products with similar names, and only set meta url on these products.

 

You might have a challenge giving these products the same url as Google knows, but maybe changing to something you know is unique, will save you trouble later on.

 

Maybe a simpler approach to the problem would be sorting your datasource before importing, since DW adds -1, -2 based on the position in the database.

 

// Martin

 
Mikkel Høst
Reply

Now we are talking!

 

 

Maybe a simpler approach to the problem would be sorting your datasource before importing, since DW adds -1, -2 based on the position in the database.
I did not know that this was the way that DW did it! Thanks! This would solve the problem :)
 
Martin Nielsen
Reply

Hi Mikkel,

 

It's not 100% confirmed, but i'm pretty sure that's how they do it.

 

Maybe someone from DW can confirm it.

 

 

// Martin

 
Morten Snedker
Reply

Problem here is that you can't know what the actual position is. So it may work; but the key word here is "may".

So the better approach definitely is defining a meta URL during (or before) import. 

 

Regards /Snedker

 
Mikkel Høst
Reply

Hi again.
Well this approach by sorting the data source isn’t a good idea anyway. I could not sort on the name, because it is the same and hence it doesn’t get sorted. If I sorted on the product number/ID consider the situation where they remove a product “-4” – Then we are in trouble again.
So the meta url approach is the way to go. But I have one question here, maybe you can answer it Morten.
When I test on my solution and call the old URL I can still render the product and the URL is not rewritten to the new meta url. Is this by design? – IMO it would be a good idea to either rewrite/redirect 301 the user to the meta url OR insert canonical rel links to the meta url page. With the current solution we now have duplicated contet.
Any ideas?
 

 

 
Morten Snedker
Reply

I don't exactly recall from which version, but on latest release you have en option on the Product Catalog module called "Use first page in list as a canonical URL". As I see it, this is what you're looking for.

Regards /Snedker

 
Mikkel Høst
Reply

Cool thanks. 

I will check it out when we get the solution upgraded at some point.

 
Peter Bille Larsen
Reply

Hi Mikkel & Morten

"Use first page in list as a canonical URL" is only made for the product lists, not the product card. Its not fully documented yet I guess. Its some stuff that Nicolai and I are working on.

It is made if you have a lot of text on the product list, and you only want google to index the first page on multiple productlist pages. (to avoid duplicate SEO text from the product lists description).

You should redirect as less as possible, Google sees this as "unnecessary 301" and give a low ranking on this.

In my opinion, and the "if it works dont fix it" -approach, you could also just find the products which makes -1,-2 and redirects these manually, and insert meta url manually. If its 50 products, then maybe it could be a low entry solution, to alternatively make 301 on the whole shop.
Also ask the client not to make equal names for products, its bad SEO and should be avoided generally!

//Peter

 
Nicolai Høeg Pedersen
Reply

@Mikkel.

 

Dynamicweb generates the URLs for products that has to be unique for all products in the catalog with the same LanuageID. If 2 or more products are named the same and have the same languageID they will be named -1, -2 etc.

 

The order of that, is unpredictable - since the system does a SELECT FROM PRODUCTS with no order. So it is the order that the SQL-Server returns the data.

 

But adding sorting or anything to this, will only work as long as the data remains the same. If you add a new product, URLs will change. So to be 100% sure, do not reuse product names, or keep track of when products are added and make unique names based on the order products are added. So best way is to use meta.url or make sure names are unique.

 

Regarding redirects and same product on 2 urls: This should not happen - you should not be able to call an old URL and still get the product. Only if you have both names registered. But if you operate directly on the database, be sure to reset the URLs by recycling the app pool or save the URL settings in mangement center. Otherwise URLs could be cached.

 

@Peter

You are right - be careful with using the canonical option for product lists. According to Google, it is not to be used in these scenarioes.

 

BR Nicolai

 
Mikkel Høst
Reply

Hello guys.

Thanks for the help and insight in how DW works in this situation. 

@Nicolai, you are right. The old URL's dont resolve anymore. I guess it was cached. Anyway, i have included the product ID in the url so this can't happen anymore, so problem is solved. 

Thanks again!

Cheers

 

You must be logged in to post in the forum