Skip to main content

Webspace: Set up Discord forwarding via domain

This guide was created with the following products:

(Details may vary with products from different providers but the main concepts remain the same)

Join Discord Server via domain

It is assumed that an own domain as well as an own webserver/webspace is available.

To be able to reach a discord server via your own domain, a .htaccess file with a corresponding forwarding rule is required.

For example, the domain example-example.de/discord should enable a forwarding to the discord server.

Step 1

Create the subdirectory "discord" on the web space/web server:

Bildschirmfoto vom 2022-05-13 05-38-40

Step 2

Creating the ".htaccess" file on the web space/web server:

Bildschirmfoto vom 2022-05-13 05-39-09

Bildschirmfoto vom 2022-05-13 05-39-58

Step 3

Create the forwarding rule in the ".htaccess" file:

Bildschirmfoto vom 2022-05-13 05-40-23#

Important with the forwarding rule is that the original domain is "exchanged" for another one. So in the forwarding rule "example-example.de" has to be replaced by the own domain and "https://discord.gg/A6e4jyg" by the own discord server address.

RewriteEngine On
RewriteCond %{HTTP_HOST} (www\.)?beispiel-example.de
RewriteRule (.*) https://discord.gg/A6e4jyg [R=301,L]

Values that must be changed:

RewriteEngine On
RewriteCond %{HTTP_HOST} (www\.)?***OWN-DOMAIN***
RewriteRule (.*) ***OWN-DISCORD-DOMAIN*** [R=301,L]

After saving, the forwarding is immediately active.

Step 4

Test forwarding:

If the domain/discord is now accessed, a redirection to Discord should take place.

Ready ✅