BlazorWasmPreRendering.Build icon indicating copy to clipboard operation
BlazorWasmPreRendering.Build copied to clipboard

links with rel="nofollow" should be ignored

Open drma-tech opened this issue 6 months ago • 2 comments

If my intention is for this link and anything within this page to be ignored by search engines, then that indicates in some way my intention to keep this page hidden.

drma-tech avatar Jun 28 '25 04:06 drma-tech

From what I've understood, you ignore links that redirect to "another site" (_blank), but there are situations where I'm redirecting to another site, but it's still within the same tab, like trying to log in, for example.

<a class="@($"button {provider.Key}")" href="@("/.auth/login/" + link + "?post_login_redirect_uri=" + Navigation.BaseUri + "login-success")" rel="nofollow">

or a profile page that has private content and I don't want it to become a static page.

drma-tech avatar Jun 28 '25 05:06 drma-tech

Hi @drma-tech, Thank you for your feedback!

A link with the rel="nofollow" attribute is just a signal for search engine crawlers. It does not always mean that the link should be avoided for static file generation. There may be some cases where someone does not want the page to be found by search engines, but still wants the page to be served quickly as a static file for people who already know the link.

On the other hand, I also understand your point well. There are surely cases where some URLs should not be turned into static files.

So, I am thinking about adding an option to skip static file generation for links with the rel="nofollow" attribute. I am still not sure whether this option should be enabled by default or not, because that might be a breaking change.

Anyway, as I wrote in another issue, I will be a bit busy until the end of this month, so I expect to start working on this after that. Thank you for your understanding.

jsakamoto avatar Jul 07 '25 23:07 jsakamoto