---
title: "How to make all links open in new tab"
slug: "how-to-make-all-links-open-in-new-tab"
description: "When you insert a hyperlink in the article, an option is available to make the hyperlink open in a new tab. There is no option in the Knowledge base portal to open all hyperlinks in knowledge base articles in a new tab."
tags: ["Customization"]
updated: 2026-03-10T04:32:18Z
published: 2026-03-10T04:32:18Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.document360.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to make all links open in new tab

When you insert a hyperlink in the article, an option is available to open the hyperlink in a new tab. There is no option in the Knowledge base portal to open all hyperlinks in knowledge base articles in a new tab. Follow the workaround below to open all the hyperlinks in a new tab.

### Solution

1. Navigate to **Settings** (<nor class="fa-solid fa-gear" data-tomark-pass=""></nor>) > **Knowledge base site** > **Site customization** > **Custom CSS & JavaScript** in the Knowledge base portal.

![Site customization options including CSS, JavaScript, and theme settings for a knowledge base.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/Custom%20css%20&amp;%20js.png)
2. From the left navigation pane, click on the **JavaScript**tab and paste the following JavaScript snippet:

Knowledge base site 1.0Knowledge base site 2.0

```javascript
jQuery(".content_block_text a").attr("target", "_blank");
```

```javascript
$(document).on("click", ".block-article a", function() { $(this).attr("target", "_blank"); });
```

1. Click **Save**.

> [!NOTE]
> ** NOTE
> 
> All hyperlinks in your article will open in a new tab now.

![](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/image-1766930298587.png)
