Yoast Slug, not adding / separator between sections
-
When using a permalink of categories/footwear products/red-shoes
If I look at the Yoast generated slug in admin, that sayscategoriesproductsred-shoes (No separating / character)
This then causes Google search console to flag up the alternate page with proper canonical tag message.
In short, why does Yoast appear to be losing the / between products in categories?
-
Anyone seen this happen before?
I can fix this BUT I would have to do it manually on all products. Can’t think of a global method.Sometimes people mix-up permalink and slug so I want to make sure I understand what you are asking.
What permalink settings are you using globally? A screenshot is probably faster than copy/paste or retyping all of the settings.
You can check this by going to Admin > Settings > PermalinksCan you also provide a screenshot of where you see the missing separating / character? Is it the within the Yoast meta box, sidebar or somewhere else?
Sorry for the delay in responding.
In the site / Product admin we use a permalink plug in that posts like this
https://www.mydomain.com/general-category/sub-category/product-nameUp until recently the Yoast slug created was in the form sub-category/product-name
Now it has changed to sub-categoryproductname NO separating slash.
If we edit any product now, to add a slash back where it was, then the slug is auto edited to this format
sub-category-product-name Everything is now separated by a – dashTo that end Google search console are now complaining the following.
Alternate page with proper canonical
One item is flagged by Google as
https://www.mydomain.com/general-category/sub-categoryproduct-name (NOTE NO / between the subcategory and the product name.Whilst this is not terminal, it is more work for us in checking.
The search console flags a URL like this
https://www.mysite.com/general-category/sub-categoryproduct-but then says Oh the user selected canonical is
https://www.mysite.com/general-category/sub-category/product-name (CORRECT with the slash) Google further say, “Google selected canonical = Same as user selected canonical. All of this difference is a pain.
After all of the above, it seems that Google are finding the Yoast slug, without (for some reason) the / between categories and products, then stating it’s wrong, but then admitting it takes the correct one anyway.
As mentioned above, if we now try to edit the Yoast slug to put a / between category and product, Yoast changes it to separate all the content with – dash characters?
/sub-category-product-nameHopefully this makes some sort of sense?
If more clarification is required, I’m happy to mail screenshots direct.As far as we are aware of that Yoast SEO snippet preview fails to show the slug correctly in some cases. However, it shouldn’t affect the actual slug by modifying it with dashes. Can you please confirm whether the slug of the relevant products page actually changes when you visit the relevant pages and check the browser address bar?
We look forward to hearing from you.
Sorry for the delay, out of office for 3 days!
Our problem is that if you go to the product, the URL is correct, in that it shows in this form.
https://www.mysite.com/products/product-category/product-name
In the site admin for the product, the permalink is set to the SAME as the above.
In the Yoast section for the product the slug shows as ALL (subcat, product name part) parts separated by a – dash.
as here “product-category-product-name”
NO slashes, and when I edit any existing products that appear to have lost the slash in the Yoast slug, they are immediately changed to dash separation format.The whole of this issue is caused by Google search console saying that it is finding a canonical url that has NO separating slash in the path, but when I then check in GSC retrieving data from the Google index, it says the URL with NO separating slashes is not in the index, but the user defined one (with slashes) IS THERE.
I have some queries on this.
Google is finding the non / separated ones somehow/somewhere.
Yoast appears not to allow me to enter a / slash to separate my product category and product name paths, and not only that, if I do enter a / when editing, then the Yoast slug path separates ALL with dashes.
I am not sure where I am going with this as it is confusing and contradictory.
We have 365 URLs (mostly products) being reported buy the Google search console coverage report.
Can you tell me IS it possible that you can separate parts of a slug in Yoast with a / character?Hi,
We would like some more information.
1. If you go to Settings-Permalinks can you confirm the permalinks are all set-up correctly?
2. Can you confirm you are using WordPress 5.3.2? You can check by clicking on the W in the top left and selecting About. If you need to update, please check with your host provider.?Please know that if you are using an older version of WordPress Core you may experience unexpected behavior with Yoast.?This guide explains more:?https://yoast.com/why-we-dont-support-old-wordpress-versions/.
3. Can you confirm you are using the most recent Yoast SEO, v12.9.1? If you update, does the issue resolve?
4. Are all your non-Yoast plugins and themes also updated?
5. Can you provide a link that highlights this issue?
1. Settings appear to be as what was set at site launch https://www.mysite.com//blog/%postname%
2 Site is on 5.2.4 but is due 5.3.2 this is a maintenance release
3. We are not on 12.9.1 but this will be done shortly
4 Site due an update Early Feb.
We’ll do all of the things suggested above and check again when completedThis set of Canonicals being reported on Google search console started recently (December 2019 January 2020) apparently the / was removed fairly wholesale. Despite checking, we do not seem to have any updates, or changes that were done then.
We’ll keep investigating, we will also keep monitoring when updates complete, will update this ticket when we have any further information.We think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium and receive our Premium email support and we can help you further.
Site updated to schedule,
If I update to premium Yoast, then it will presumably not be the same as the free version? Which has a fault in the the slug – regardless of what I enter, it forces a dash “-” between items that never had a dash before.
Google search console is telling me I have a canonical error because of this.Has no one any suggestions as to why Yoast is forcing dashes into the slug?
This
(SLUG VALUE ENTERED) category/post-name/pp22
Becomes this
category-post-name-pp22
when input to Yoast and update, I do NOT want the / removed and cannot see why that is happening.
-
This reply was modified 4 years, 11 months ago by
robmcp.
How this question is resolved when no answer has been given?
This is not specific to a particular site. It’s the issue with your slug field in ‘Edit snippet’ tool. This issue is causing lot of problems.
Now, please understand the issue in simple terms:
If the actual URL of the web page is https://www.xyz.com/london/best-restaurants, then the ‘slug’ field in Yoast ‘edit Snippet’ box shows london-best-restaurants
And then Google shows this URL in SERP: https://www.xyz.com/london-best-restaurants but when it is clicked, it opens https://www.xyz.com/london/best-restaurants
In reality, there is no existence of this URL: https://www.xyz.com/london-best-restaurants
Why Yoast doesn’t allow ‘/’ in the ‘slug’ field of ‘Edit Snippet’ box?
I hope you understand this question.
P.S – I have premium plugin only.
THIS IS STILL AN ISSUE. I have lived with it until now, but we’re getting URLs being changed and have no control over it.
My previous query had a response of use the premium version. As I now see from the user above, they have a premium version and this is happening to them. The slug is changing to a different URL layout than the permalink one. This causes confusion.
Is there ANY reason why Yoast should remove my / separator, and replace it with a – character?Hi @robmcp and @zealjatin,
This sounds like the problem is with the way Yoast SEO is displaying the URLs in the slug field. We would expect that trying to add a slash in the slug field to correct the URL would cause a dash to appear instead. Slashes are usually controlled by the permalink structure, so WordPress changes them to dashes in post slugs by default.@robmcp Sorry to hear that this issue is still happening. We can understand how frustrating it is to not have a solution for you by now.
We’d like to rule out any possible conflicts, so we’d like you to take the steps in this guide to test:?How to check for plugin conflicts.
If you’ve checked for conflicts and can give us the steps to reproduce this problem, we ask you to create a new GitHub bug report for our developers. This is a better way to track these issues and you can be notified about its progress.
@zealjatin, We see that you reported a similar issue, but we’d like you to troubleshoot the issue on your specific site. To get support for the premium version, you can contact our support team directly.
Unfortunately, per the forum guidelines, we cannot answer questions about our premium products in this forum.
Thanks Priscilla.
For info. This was seemingly not an issue until recently.
We could, at one point replicate the URL structure that was in the permalink section, in the same way within the Yoast slug part.
Interesting to us, to note that a premium version seems to be behaving in the same way.
It is impossible to enter a slug in the Yoast slug part like this
/product-category/product/sku-no attempting that, then saving, all that happens is that the / chars are changed to –We have tried the following, disable ALL plug ins, (Incl Permalink plug in) but NOT Yoast or Woocommerce.
The result is that our permalink URL shows with the sub cat / breakdowns but when we try to enter the equivalent into Yoast, (with / chars) all / chars are replaced with a –
This makes the slug look clunky and not easy to read.
What can you suggest wee do next?Hi,
@robmcp We can see you have several different issues. We have responded to them below.
A. It is impossible to enter a slug in the Yoast slug part like this
/product-category/product/sku-no attempting that, then saving, all that happens is that the / chars are changed to –
This is expected behavior. What you are doing is trying to change the slug. So the slug is sku-no, and whatever you enter into that slug field gets added to the end of it. What you want to do is change the permalink so the permalink includes: /product-category/product/.Note that the slug field only shows the slug. It does not show the permalink.
We would like some more information.
1. Were you expecting to be able to edit the permalink from that slug field?
2. If you go to the front-end of the post with the issue does the right URL appear in the browser URL field?
3. If you check the source code of the page does the right canonical appear? This guide explains more about how to check and search the source code: https://yoast.com/help/view-page-source-site/
B.Getting Permalinks Right
We understand you are using a permalink plugin. We have had reports in the past where there are issues with permalink plugins. See this one for example: https://github.com/Yoast/wordpress-seo/issues/4193.Can you let us know what permalink plugin you are using?
C. Premium Plugin
If you are a premium plugin user, please send us an email to [email protected]. That way we can review your account and settings and work with you to troubleshoot the issue more than what we can provide here. In your reply to us please link to this issue so we can see what has been said and done.Sorry for the delay in responding.
We might be mistaken on this and the way the Yoast slug works.1. Were you expecting to be able to edit the permalink from that slug field?
That is a NO.2. If you go to the front-end of the post with the issue does the right URL appear in the browser URL field?
YES, it displays as per the permalink with cats, subcats, prodname and SKU on the end.3. If you check the source code of the page does the right canonical appear?
Link rel canonical shows the URL as per No.2.We were under the impression that Yoast generated the Slug FROM the permalink, it looks like we are wrong on this.
I did think that at one time we ‘Could’ see a / char in the Yoast slug. If that was never the case, then we’re fine with that.
BUT, we do have examples of slugs on products that are created as below, note there is no – before the sku07 sku number.
Product-category-Product-namesku07
This has also happened in this form, no – between category and product they are separate entities.
Product-categoryProduct-name-sku07
It seems as though it has not consistently determined where a name part ends, and can concatenate it without the – char.
We’re generally on the latest version of Yoast, so all we can say is, perhaps we’ve had errors in the past, but now, bar the corrupted ones, most slugs are separated by the – char ONLY.As a matter of interest what happens if users don’t bother entering a value in the SLug field (I am not sure if Yoast will make one up from the permalink) but other than that I am not sure.
-
This reply was modified 4 years, 11 months ago by
- The topic ‘Yoast Slug, not adding / separator between sections’ is closed to new replies.