Complete uBlock Origin Filter Rules to Block Civitai Ad Banners

uBlock Origin filter rules to block Civitai ad banners and fix resulting layout issues.
This guide provides complete uBlock Origin custom filter rules to remove intrusive 'Support Civitai creators' ad banners on Civitai, covering link-style ads, closeable container ads, and 300×600 sidebar ads. It also includes a layout fix rule for post-removal content shifts, with step-by-step setup instructions and notes on Firefox vs. Chrome compatibility.
The Browsing Experience Problem with Civitai Ad Banners
Civitai is one of the most popular AI art model sharing platforms, hosting a vast collection of Stable Diffusion, LoRA, Checkpoint, and other model resources. Since launching in late 2022, it has quickly become the most important model hosting hub in the Stable Diffusion ecosystem. Checkpoints are full base models, typically ranging from 2GB to 7GB in size; LoRA (Low-Rank Adaptation) is a lightweight fine-tuning technique that encodes specific styles or characters in files of just a few dozen megabytes through low-rank matrix decomposition; the platform also hosts Textual Inversions, Hypernetworks, VAEs, and other model types. By 2024, the total number of hosted models had surpassed hundreds of thousands, making it the central hub for content circulation in the AI art community.
As the platform accelerates its monetization, prominent "Support Civitai creators" ad banners have begun appearing frequently, persistently steering users toward paid pages. These banners often occupy prime real estate on the page, with some sidebar ads reaching 300×600 pixels in size — seriously disrupting normal browsing of model lists and detail pages. Recently, a Reddit user shared a set of custom uBlock Origin filter rules that precisely remove these ads and fix the layout shift that occurs after they're gone.
Complete Filter Rules
Blocking the Ad Banners
The following three rules target three common ad formats: link-style ads, container-style ads with a close button, and fixed-size sidebar ads:
civitai.*##a[href="/pricing"]:has(> img[alt="Support Civitai creators"])
civitai.*##div:has(> a[href="/pricing"] > img[alt="Support Civitai creators"]):has(> button[aria-label="Close ad"])
civitai.*##div:has(> a[href="/pricing"] > img[alt="Support Civitai creators"][width="300"][height="600"])
The syntax of these rules is worth understanding in depth. In uBlock Origin filter rules, the ## delimiter separates the domain pattern on the left from the CSS selector on the right. The :has() pseudo-class, introduced in CSS4, allows matching a parent element based on the characteristics of its descendants or children — extremely useful for ad blocking, since ad containers themselves often lack obvious identifiers, while their child elements (such as links to a pricing page) have distinctive attributes. civitai.* is a wildcard extension syntax unique to uBlock Origin.
The design philosophy behind these rules is noteworthy: rather than relying on element IDs or class names that can easily change with updates, they precisely target ad elements by matching links pointing to the /pricing page and image alt="Support Civitai creators" attributes. This semantic attribute-based matching approach is more stable and less likely to be circumvented by the platform's style updates.
Fixing Page Layout Shift
After removing the ads, the main content on model detail pages may shift out of position. Reddit user u/fullmetaljackass provided the following layout fix rule:
civitai.*##.mantine-Container-root:style(margin-inline: auto !important;)
This rule uses uBlock Origin's proprietary :style() extension pseudo-class, which allows injecting CSS styles directly into matched elements to fix the layout — one of the unique advantages uBlock Origin has over pure request-blocking approaches. The rule forces the main container's horizontal margins to be set to auto-centering, ensuring page content remains neatly arranged even after the ads disappear.
The mantine-Container-root class name reveals that Civitai's frontend interface is built on Mantine, a React component library. Mantine was released by Russian developer Vitaly Rtishchev in 2021, known for its rich component set and native TypeScript support, with CSS class names following the stable convention of mantine-[ComponentName]-[part]. Civitai uses the Next.js framework paired with Mantine for its frontend — a popular tech stack in the React community from 2022 to 2023. Because Mantine's class name structure is relatively stable, filter rules written around it are more durable than those relying on randomly hashed class names.
Configuration Steps
The setup process is straightforward. Follow these steps:
- Open the uBlock Origin extension and go to the Dashboard
- Switch to the My filters tab
- Paste all the rules above into the text box
- Click Apply changes to save
You may not have noticed that the rules use the civitai.* wildcard notation, which simultaneously covers both Civitai's .com and .red domains — the latter being an alternate domain the platform uses to work around access restrictions in certain regions.
Browser Compatibility Notes
The rule author explicitly notes that this solution has only been fully tested on Firefox. Whether it works completely on Chrome and Chromium-based browsers remains uncertain.
The underlying reason is closely tied to Google's rollout of the Manifest V3 (MV3) standard. MV3 is a new-generation API specification for Chrome extensions that Google began enforcing in 2023. Compared to the older MV2, MV3 moves dynamic request interception from extension code to the browser's built-in declarativeNetRequest API, while strictly limiting extensions' ability to run persistently in the background. For uBlock Origin, the impact is twofold: the cap on filter rule count is reduced, and complex dynamic filtering logic (such as parsing :has() selectors based on page context) suffers in both execution efficiency and compatibility. Firefox's continued use of the MV2 standard allows uBlock Origin to leverage the full capabilities of its filtering engine — which is the core technical reason the privacy and security community has long recommended Firefox. If rules aren't working in Chrome, you can try switching to uBlock Origin Lite, or migrate to Firefox entirely.
A Broader Reflection: Balancing Monetization and User Experience
The fact that users are spontaneously writing their own filter rules reflects a long-standing tension between monetization and user experience on AI content platforms. As a community-driven open-source model platform, Civitai's reliance on ads and paid subscriptions to sustain operations is entirely understandable — but overly aggressive ad placements will gradually erode user experience and community trust.
From a technical standpoint, uBlock Origin's attribute selectors and :has() syntax give users powerful custom blocking capabilities. Understanding the underlying logic of writing these rules — domain wildcards, CSS relational pseudo-classes, semantic attribute matching, and :style() injection — isn't just applicable to Civitai; the same principles can be applied to handle intrusive elements on other websites as well. Of course, if you're able to, consider supporting the platforms you use most — it helps keep quality AI model communities running.
Related articles

Grok 4.5 Feels Weaker in Cursor? A Deep Dive into AI Coding Tool Integration Differences
Users report Grok 4.5 underperforms in Cursor vs. the official terminal. We analyze how system prompts, context management, parameters, and tool calling create AI coding tool integration gaps.

Carta: Pandoc Rewritten in Rust — 45x Faster, 20x Smaller
Carta is a Rust reimplementation of Pandoc with a 9MB binary (1/20th of Pandoc) and up to 45x faster conversion. Supports Markdown, DOCX, LaTeX, and Pandoc JSON filters.

A Beginner's Guide to AI Agents: Core Principles and Learning Paths Explained
Learn AI Agent core principles from scratch: understand how Agents differ from LLMs, their execution mechanisms, why rule design matters, and find the right learning path for your goals.