I want it to be map.[mydomain]
You can redirect from map.[] subdom to dynmap webserver
I know, but I want it to run on my domain so it shows map.mydomain at the top
You need to set up your DNS records to do this, this issue isn't really in the scope of Dynmap. Learn about CNAME and A records and change your DNS zone configuration to match.
How would I do the CNAME? Do i do it like i did it with Minecraft?
You want an A or CNAME record as map.example.com pointed towards whatever domain or IP your dynmap webserver is located on. If it's an IP, use an A or AAAA record. If it's a domain name, use a CNAME record.
To add on to this, if you want your dynmap to run on your webserver, you need to set it up by following this guide:
https://github.com/webbukkit/dynmap/wiki/Setting-up-without-the-Internal-Web-Server
This guide assumes you have a web server set up on the same system as your Minecraft server.
As @Technoguyfication indicated, what you are talking about is "How do I use DNS?" and isn't at all about Dynmap (or any other web or IP app) - you need to configure DNS to point to the IP address (using an A or AAAA record) or existing DNS name (using a CNAME record), and doing so is done via your domain registrar/hosting. DNS controls how you get to a destination - there isn't anything the code at the destination (e.g. Dynmap or a web server) can do to get you there.
I use nginx reverse proxy to do this:
First set DNS record map.mc.mydomain.com to my your server:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# HTTPS server to handle JupyterHub
server {
listen 80;
listen 443 ssl;
server_name map.mc.mydomain.com;
#if you want use https, get letsencrypt cert first
ssl_certificate /etc/letsencrypt/live/map.mc.mydomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/map.mc.mydomain.com/privkey.pem;
location /.well-known {
alias /var/www/html/.well-known;
}
#
location / {
proxy_pass http://localhost:8123;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-IP $remote_addr;
# websocket headers
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
and I think this issue isn't dynmap's issue.
Most helpful comment
You want an A or CNAME record as
map.example.compointed towards whatever domain or IP your dynmap webserver is located on. If it's an IP, use an A or AAAA record. If it's a domain name, use a CNAME record.