{"id":166790,"date":"2026-06-09T21:34:06","date_gmt":"2026-06-09T18:34:06","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/"},"modified":"2026-06-09T21:34:06","modified_gmt":"2026-06-09T18:34:06","slug":"virtual-host-command-plugin","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/","title":{"rendered":"Virtual Host Command Plugin"},"content":{"rendered":"<p># Virtual Host Command Plugin for Bukkit\/Minecraft<br \/>\nEver thought of having different domains\/subdomains for the same Minecraft\/Bukkit server and depending on the domain a player joins offer different settings?<br \/>\nThis plugin is a bit like apache virtual hosts, detecting the host name of the Minecraft server the player used (CNAMEs). You can configure what commands to run on joining the server depending on the host name. E.g. you can have a server with multiverse and subdomains hub.example.com and pvp.example.com and then send the player directly to the hub-world or the arena-world depending on the domain they used to connect to the server.<br \/>\n> **Note:** Bedrock proxy with **geyser** does not supply the host name on join \u2013 so it&#8217;s not working for vhosts. It only supplies the IP address, so you need a different IP address for each domain connecting via geyser\/proxy.<br \/>\n> **FIX** add the following to you geyser config.yml:<\/p>\n<p>      # Forward the hostname that the Bedrock client used to connect over to the Java server<br \/>\n      # This is designed to be used for forced hosts on proxies<br \/>\n      forward-hostname: true<\/p>\n<p>> **Note:** We heavily rely on the supplied hostname. This is not always given in PingServerList list event, so **motd** and **icon** per vhost does not always work on all server implementations. For paper-mc we added a workaround to get the hostname used for the ping.<\/p>\n<p>Here is an example of four vhosts running on the same server with the same IP address but accessed using different vhosts via different CNAMEs:<\/p>\n<p>![Example Minecraft Server List](docs\/example-server-list.png?raw=true &#8220;Example Minecraft Server List&#8221;)<\/p>\n<p>### Update 0.9.2<br \/>\n &#8211; minor fixes, cleanup, housekeeping<br \/>\n &#8211; added *ifInWorld* and *ifNotInWorld* conditions (see example config)<\/p>\n<p>### Update 0.9.3<br \/>\n &#8211; small fixes<br \/>\n &#8211; added *motd* and *icon* config for vhosts (see example config)<\/p>\n<p>## Example Config<br \/>\nsee up2date file in *plugins\/VirtualHostCommandPlugin\/config.yml*<\/p>\n<p>    # Example config file for VirtualHostCommand bukkit plugin<br \/>\n    # Location: plugins\/VirtualHostCommandPlugin\/config.yml<\/p>\n<p>    vhosts:<br \/>\n      host_example:<br \/>\n        # the hoostname is matched agains the joining hostname via starts-with, so parts work as well<br \/>\n        # you can also add the port, sub.domain.com:port<br \/>\n        # it&#8217;s mandatory, and always case-insensitive<br \/>\n        hostname: example.com<br \/>\n        # (optional) only run if player joined this world(s)<br \/>\n        ifInWorld: &#8220;world_some_regex&#8221;<br \/>\n        # (optional) only run if player did not join this world(s)<br \/>\n        # if ifInWorld and ifNotInWorld present, they must be both true<br \/>\n        ifNotInWorld: &#8220;world_some_regex&#8221;<br \/>\n        # (optional) MOTD for this vhost<br \/>\n        # NOTE: this only works if you server implementation returns a hostname in the ping event, many don&#8217;t \ud83d\ude41<br \/>\n        #       for  paper-mc we have added a workaround to fetch the vhost hostname pinged via reflection.<br \/>\n        motd: &#8220;some colorfull MOTD server messagenmultiline if you like!&#8221;<br \/>\n        # (optional) server icon filename, format like server-icon.png, same root directory<br \/>\n        # NOTE: same restrictions as for &#8216;motd&#8217; config option apply<br \/>\n        icon: server-icon-example.png<br \/>\n        # List of commands to be executed if joining via this hostname<br \/>\n        commands:<br \/>\n          # he following placeholders are allowd:<br \/>\n          # %player% , %hostname% and %port%<br \/>\n          &#8211; some command &#8230;<br \/>\n          &#8211; another cmmand with %player% to replace with player name<br \/>\n          &#8211; msg %player% haha it works from %hostname%<\/p>\n<p>      host_example2:<br \/>\n        # example with an IP<br \/>\n        hostname: &#8220;123.45.67.89&#8221;<br \/>\n        commands:<br \/>\n          &#8211; some command &#8230;<br \/>\n          &#8211; another cmmand with %player% to replace with player name<br \/>\n          &#8211; msg %player% haha it works<\/p>\n<p>      host_hub:<br \/>\n        hostname: hub.myworld.com<br \/>\n        ifNotInWorld: &#8220;^world_hub&#8221;<br \/>\n        commands:<br \/>\n          &#8211; gamemode %player% survival<br \/>\n          &#8211; msg %player% crazy shit<br \/>\n          &#8211; mv tp %player% world_hub<\/p>\n<p>see https:\/\/github.com\/cgaffga\/mc-vhost\/tree\/main\/docs<\/p>\n<p>## Source<br \/>\nSource code can be found at https:\/\/github.com\/cgaffga\/mc-vhost\/<\/p>\n<p>## Download<br \/>\n* Builds in https:\/\/github.com\/cgaffga\/mc-vhost\/tree\/main\/dist\/<br \/>\n* Spigot https:\/\/www.spigotmc.org\/resources\/virtualhostcommandplugin.113311\/<br \/>\n* Bukkit https:\/\/legacy.curseforge.com\/minecraft\/bukkit-plugins\/virtualhostcommandplugin<br \/>\n* Modrinth https:\/\/modrinth.com\/mod\/virtual-host-command-plugin<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever thought of having different domains\/subdomains for the same Minecraft\/Bukkit server and depending on the domain a player joins offer different settings? This plugin is a bit like apache virtual hosts, for Minecraft servers<\/p>\n","protected":false},"featured_media":166791,"template":"","meta":{"_minecraft_slug":"virtual-host-command-plugin","_minecraft_project_id":"GLqGwlxD","_minecraft_author":"cgaffga","_minecraft_license":"Apache-2.0","_minecraft_downloads":187,"_minecraft_follows":7,"_minecraft_client_side":"unsupported","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"virtual-host-command-plugin.zip","_minecraft_size_bytes":6363,"_minecraft_version_count":1,"_minecraft_updated_at":"2026-05-16T12:52:33.581526Z","_minecraft_date_created":"2023-12-16T10:38:38.168426Z","_minecraft_date_modified":"2023-12-13T12:29:25.395847Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/virtual-host-command-plugin","_minecraft_icon_attachment_id":166791,"_minecraft_imported_at":"2026-06-09T18:34:06+00:00","_minecraft_import_hash":"d05b74e9481fcfae0bded7710117a83b","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[124,126,127,129,123],"mod_loader":[130,132,134],"minecraft_version":[60,93,94,101,102,62,37,73,74,38,78,79,80,81],"class_list":["post-166790","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-bukkit","mod_category-management","mod_category-paper","mod_category-spigot","mod_category-technology","mod_loader-bukkit","mod_loader-paper","mod_loader-spigot","minecraft_version-1-20-2","minecraft_version-1-20-3","minecraft_version-1-20-4","minecraft_version-1-20-5","minecraft_version-1-20-6","minecraft_version-1-21","minecraft_version-1-21-1","minecraft_version-1-21-2","minecraft_version-1-21-3","minecraft_version-1-21-4","minecraft_version-1-21-5","minecraft_version-1-21-6","minecraft_version-1-21-7","minecraft_version-1-21-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Virtual Host Command Plugin - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Virtual Host Command Plugin - Minecraft\" \/>\n<meta property=\"og:description\" content=\"Ever thought of having different domains\/subdomains for the same Minecraft\/Bukkit server and depending on the domain a player joins offer different settings? This plugin is a bit like apache virtual hosts, for Minecraft servers\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/virtual-host-command-plugin\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/virtual-host-command-plugin\\\/\",\"name\":\"Virtual Host Command Plugin - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/virtual-host-command-plugin\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/virtual-host-command-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/virtual-host-command-plugin-icon-faad1485205da242561a3310cdf6a13c338d1fa6_96.webp\",\"datePublished\":\"2026-06-09T18:34:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/virtual-host-command-plugin\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/virtual-host-command-plugin\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/virtual-host-command-plugin\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/virtual-host-command-plugin-icon-faad1485205da242561a3310cdf6a13c338d1fa6_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/virtual-host-command-plugin-icon-faad1485205da242561a3310cdf6a13c338d1fa6_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/virtual-host-command-plugin\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Virtual Host Command Plugin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Virtual Host Command Plugin - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/","og_locale":"en_US","og_type":"article","og_title":"Virtual Host Command Plugin - Minecraft","og_description":"Ever thought of having different domains\/subdomains for the same Minecraft\/Bukkit server and depending on the domain a player joins offer different settings? This plugin is a bit like apache virtual hosts, for Minecraft servers","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/","name":"Virtual Host Command Plugin - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/virtual-host-command-plugin-icon-faad1485205da242561a3310cdf6a13c338d1fa6_96.webp","datePublished":"2026-06-09T18:34:06+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/virtual-host-command-plugin-icon-faad1485205da242561a3310cdf6a13c338d1fa6_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/virtual-host-command-plugin-icon-faad1485205da242561a3310cdf6a13c338d1fa6_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/virtual-host-command-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"Virtual Host Command Plugin"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/166790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/166791"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=166790"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=166790"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=166790"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=166790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}