I am trying to find out whether the permalink structure affects ranking and which of these two permalinks is better to use.
I have nested categories on my blog, now my link looks as follows
But I am not sure whether such permalink structure is good for page ranking.
Is it better to use the following format instead ?
I would be grateful for any help, advice or explanation.
It's very important to understand advantages and disadvantages of short URL with minimum categories vs long URL with more categories.
First thing first, lets understand from the user point of view, if you will have too many categories associated, will it be any beneficial for the user? If it is too long and confusing then definitely not recommended.
We all know that having keywords in the URL is a signal for ranking, but we shouldn't be over thinking about it.
Also, if you will have less categories, you will have shorter URL which will mostly fit in the default Google search display else it will get shorten up by Google.
Also, worth considering mobile users too.
Your first URL seem to have too may categories.
Maybe you could consider having generic categories, so max there would be only on category after /blog and then the blog URL. In this way, it will be more meaningful.