<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anna Hajare</title>
    <description>The latest articles on DEV Community by Anna Hajare (@anna_hajare_9520a4c4d15ee).</description>
    <link>https://dev.to/anna_hajare_9520a4c4d15ee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2840143%2F4520236a-3dbf-4c5c-810d-da8d2532daa1.jpg</url>
      <title>DEV Community: Anna Hajare</title>
      <link>https://dev.to/anna_hajare_9520a4c4d15ee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anna_hajare_9520a4c4d15ee"/>
    <language>en</language>
    <item>
      <title>SeoEngine for filter the link?</title>
      <dc:creator>Anna Hajare</dc:creator>
      <pubDate>Wed, 07 Jan 2026 06:35:28 +0000</pubDate>
      <link>https://dev.to/anna_hajare_9520a4c4d15ee/seoengine-for-filter-the-link-38di</link>
      <guid>https://dev.to/anna_hajare_9520a4c4d15ee/seoengine-for-filter-the-link-38di</guid>
      <description>&lt;p&gt;&lt;strong&gt;You absolutely CAN create a small “SEO indexability engine”.&lt;/strong&gt; And for your use case (?page=2 indexable, ?sort=hhh not indexable), this is actually the best &lt;strong&gt;long-term solution.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Below is a &lt;strong&gt;clean, production-ready &lt;a href="https://www.mindstick.com/articles/339024/seo-and-web-design-how-to-make-your-site-search-engine-friendly" rel="noopener noreferrer"&gt;SEO engine&lt;/a&gt;&lt;/strong&gt; for &lt;strong&gt;&lt;a href="https://www.mindstick.com/category/article/asp-dot-net-mvc" rel="noopener noreferrer"&gt;ASP.NET MVC 5&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this SEO Engine Will Do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Decide indexable vs non-indexable&lt;/li&gt;
&lt;li&gt;Handle pagination, sort, filter, search params&lt;/li&gt;
&lt;li&gt;Generate &lt;a href="https://www.mindstick.com/blog/305064/what-is-a-canonical-url-how-to-fix-canonical-issue" rel="noopener noreferrer"&gt;canonical URL&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Control meta robots automatically&lt;/li&gt;
&lt;li&gt;Centralized (no duplicate logic in views)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SEO RULE ENGINE (Concept)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;page&lt;/td&gt;
&lt;td&gt;Indexable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sort&lt;/td&gt;
&lt;td&gt;Noindex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;filter&lt;/td&gt;
&lt;td&gt;Noindex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;search&lt;/td&gt;
&lt;td&gt;Noindex&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  SEO Decision Model
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class SeoResult
{
    public bool IsIndexable { get; set; }
    public string CanonicalUrl { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  SEO Engine (Core Logic)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static class SeoEngine
{
    private static readonly HashSet&amp;lt;string&amp;gt; NonIndexableParams =
        new HashSet&amp;lt;string&amp;gt;(StringComparer.OrdinalIgnoreCase)
        {
            "sort",
            "filter",
            "search",
            "utm_source",
            "utm_medium"
        };

    public static SeoResult Evaluate(HttpRequestBase request)
    {
        var query = request.QueryString;
        bool hasNonIndexableParam = false;

        foreach (string key in query.Keys)
        {
            if (key == null) continue;

            if (NonIndexableParams.Contains(key))
                hasNonIndexableParam = true;
        }

        var baseUrl = request.Url.GetLeftPart(UriPartial.Path);

        return new SeoResult
        {
            IsIndexable = !hasNonIndexableParam,
            CanonicalUrl = baseUrl
        };
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Works in ASP.NET MVC 5&lt;/li&gt;
&lt;li&gt;Clean extension syntax&lt;/li&gt;
&lt;li&gt;No breaking changes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Extension Method for HtmlHelper
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static class SeoEngineExtensions
{
    public static SeoResult Evaluate(this HtmlHelper htmlHelper)
    {
        var request = htmlHelper.ViewContext.HttpContext.Request;
        return SeoEngine.Evaluate(request);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Use Engine in Controller
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public ActionResult Index(int page = 1, string sort = null)
{
    var seo = SeoEngine.Evaluate(Request);

    ViewBag.CanonicalUrl = seo.CanonicalUrl;
    ViewBag.NoIndex = !seo.IsIndexable;

    ViewBag.Page = page;

    return View();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Layout (_Layout.cshtml)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="canonical" href="@ViewBag.CanonicalUrl" /&amp;gt;

@if (ViewBag.NoIndex == true)
{
    &amp;lt;meta name="robots" content="noindex, follow" /&amp;gt;
}
else
{
    &amp;lt;meta name="robots" content="index, follow" /&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What This Engine Achieves
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;URL&lt;/th&gt;
&lt;th&gt;Canonical&lt;/th&gt;
&lt;th&gt;Indexable&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;/articles&lt;/td&gt;
&lt;td&gt;/articles&lt;/td&gt;
&lt;td&gt;Indexable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/articles?page=2&lt;/td&gt;
&lt;td&gt;/articles?page=2&lt;/td&gt;
&lt;td&gt;Indexable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/articles?sort=asc&lt;/td&gt;
&lt;td&gt;/articles&lt;/td&gt;
&lt;td&gt;Noindexable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/articles?sort=asc&amp;amp;page=2&lt;/td&gt;
&lt;td&gt;/articles?page=2&lt;/td&gt;
&lt;td&gt;Noindexable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/articles?utm_source=fb&lt;/td&gt;
&lt;td&gt;/articles&lt;/td&gt;
&lt;td&gt;Noindexable&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Google-safe&lt;/li&gt;
&lt;li&gt;No duplicate content&lt;/li&gt;
&lt;li&gt;Crawl budget preserved&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Is the RIGHT Approach
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Centralized SEO logic&lt;/li&gt;
&lt;li&gt;Easy to extend&lt;/li&gt;
&lt;li&gt;No fragile Razor conditions&lt;/li&gt;
&lt;li&gt;Works &lt;a href="https://dev.to/strapi/seo-friendly-pagination-solution-for-large-websites-1ago"&gt;with pagination&lt;/a&gt;, filters, tracking params&lt;/li&gt;
&lt;li&gt;Matches Google best practices&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Also Read&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://answers.mindstick.com/blog/8/how-to-implement-websocket-in-dot-net-for-chats" rel="noopener noreferrer"&gt;How to implement WebSocket in .net for chats?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://answers.mindstick.com/blog/3/now-essential-why-e-e-a-t-optimization-is-for-top-google-rankings" rel="noopener noreferrer"&gt;Now Essential Why E-E-A-T Optimization Is for Top Google Rankings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://answers.mindstick.com/blog/1/how-to-implement-chatgpt-in-a-website-complete-guide" rel="noopener noreferrer"&gt;How to Implement ChatGPT in a Website (Complete Guide)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Centralized SEO</title>
      <dc:creator>Anna Hajare</dc:creator>
      <pubDate>Wed, 07 Jan 2026 06:34:57 +0000</pubDate>
      <link>https://dev.to/anna_hajare_9520a4c4d15ee/centralized-seo-6l2</link>
      <guid>https://dev.to/anna_hajare_9520a4c4d15ee/centralized-seo-6l2</guid>
      <description></description>
    </item>
  </channel>
</rss>
