Discord server widget not working? Causes and fixes

Updated

A Discord widget that does not show usually has one of these causes: the widget is off, it was switched on only minutes ago, the ID is wrong, your site blocks the frame, or it works but does less than you expected. Find your symptom below.

For a quick answer, the free Discord server widget code generator asks Discord about your server ID, tells you whether the widget is on, and writes the code.

The widget shows a spinner that never stops

Discord's widget page asks Discord for your server's widget data. If that request fails, the page keeps showing the spinner, under "0 Members Online", and no error (this is how Discord's widget behaved when we checked in November 2026). Open this address in your browser, with your server ID in place of SERVER_ID:

https://discord.com/api/guilds/SERVER_ID/widget.json

What you get back tells you the cause:

Answer Cause Fix
{"message": "Widget Disabled", "code": 50004} The widget is turned off Turn it on (below)
{"message": "Unknown Guild", "code": 10004} The ID is not a server ID Copy the server ID again (below)
"You are being rate limited" Too many requests from your connection Wait and try again
A block of data starting {"id": The widget works Look at your site (see "The widget is blank, or the frame is refused")

Turn the widget on

  1. In Discord, open your server's settings and go to Engagement. The widget is at the bottom of that page, under Server Widget. Only members with the Manage Server permission can change it.
  2. Turn on Enable Server Widget.
  3. If you want a "Join Discord" button, choose the channel the widget's invite should lead to (see below).

Wait five minutes

Discord's answer can be cached for a few minutes (five, when we checked in November 2026), the "Widget Disabled" answer included. If you have just switched the widget on, wait five minutes and reload.

Use the server ID, not a channel ID

The widget needs the server ID. An ID that is not a server's ID, such as a channel ID, gives "Unknown Guild". To copy the right one, turn on Developer Mode (User Settings, then Advanced), right-click your server's icon and choose Copy Server ID.

The banner image says "Unknown Guild"

Discord also offers the widget as an image (widget.png, with the styles shield and banner1 to banner4). For an existing server whose widget is off, the image address answered "Unknown Guild" when we checked (November 2026), not "Widget Disabled", and the page shows a broken image. So if a banner fails with "Unknown Guild" and you are sure of the ID, turn the widget on.

There is no "Join Discord" button

The button appears only when the widget has an invite channel. In the widget settings, choose the channel the invite should lead to. With no invite channel set, the widget shows the online list but no way to join.

It shows voice channels but not text channels

This is how the widget works. It lists only voice and stage channels that @everyone can see, with who is in them. Text channels and messages are never shown. A voice channel that @everyone cannot see is not listed either.

Not every online member is listed

The widget lists at most 100 members, and only those online. The number at the top ("N Members Online") counts everyone online, so it can be higher than the list. Discord also anonymises members' IDs and avatars in the widget.

The widget is blank, or the frame is refused

If widget.json returns your server's data but your page shows nothing, the problem is on your site.

  • Your site's Content-Security-Policy. If your site sends this header, its frame-src (or child-src / default-src) must allow https://discord.com. Your browser's developer console says when a frame is refused.
  • Your site builder strips the code. Some builders remove iframes from normal text blocks, or allow custom code only on paid plans. Paste the code into the builder's HTML or embed block.
  • A sandbox attribute with missing permissions. The widget is drawn by a script, so a sandboxed frame needs allow-scripts or it stays empty. The "Join Discord" link opens a new tab, which needs allow-popups, and allow-popups-to-escape-sandbox so the new tab is not sandboxed too. If you changed the sandbox value from Discord's ready-made code, put it back as Discord gave it, or remove sandbox and test again.
  • A browser extension. Content and privacy blockers sometimes hide social widgets. Test in a private window with extensions off before you change anything else.

When we checked (November 2026), Discord's widget page did not block framing, so a refused frame is almost always your own site's policy or builder.

Dark or light

The widget has two looks. Add theme=light to the iframe address for the light one:

<iframe src="https://discord.com/widget?id=SERVER_ID&theme=light" width="350" height="500" style="border:0" title="Discord server widget"></iframe>

Any other value, or none, gives the dark look. There are no other themes and no colour settings. If you need a different design, a developer can build one from the widget.json data, which is public once the widget is on (within Discord's Developer Terms).

Size and phones

The widget fills the iframe you give it, so the size is set on your iframe tag. To keep it from overflowing a phone screen, let it shrink with the page:

<iframe src="https://discord.com/widget?id=SERVER_ID&theme=dark"
  width="100%" height="500"
  style="display:block;max-width:350px;border:0"
  title="Discord server widget"></iframe>

Change 350 to the widest you want it and 500 to the height.

A quick checklist

  1. widget.json for your server ID returns data, not an error.
  2. You waited five minutes after switching the widget on.
  3. The ID in the iframe address is the server ID.
  4. An invite channel is set, if you want the Join button.
  5. Your site's Content-Security-Policy allows https://discord.com in frame-src (or child-src / default-src).
  6. The code sits in your builder's HTML or embed block, not in a text block.
  7. The iframe has no sandbox attribute, or the one Discord's code gave you.
  8. It works in a private window with extensions off.

If what you wanted was the actual chat

Discord's widget is a "who is online" box. It cannot show your text channels, and visitors cannot post through it. If you wanted the conversation itself on your site, you need a bot that relays a channel. Wizcord does this: visitors read the channel live and can post as a guest or signed in with Discord. See how to embed a live Discord channel on your website, or compare the options in WidgetBot alternatives.

Wizcord is free while it is in beta.

Create an accountRead the documentation