Use parse_url()
:
echo parse_url( get_permalink(), PHP_URL_HOST );
Related Posts:
- Multisite wordpress and subdomain URL collisions
- Multisite on Windows with wildcard subdomains
- Are nested subdomains possible with a subdomain multisite?
- WP Multisite development with Mamp Pro and wildcard subdomains, not really working for me
- How to use alias domain for multisite installation?
- SSL wildcard issue for wp multisite subdomains
- Wildcard subdomain for the same site
- Create multiple subdomains for multi-site from a database
- WordPress Multisite. Can domain be used instead of subdomain?
- NGinx + WordPress Subdomain Multi with core in Subdirectory
- Set subdomains live in a next step
- Multisite installation combining subdomains and subdirectories
- How does wordpress multisite manage subdomains?
- Why can’t a WordPress network (multisite) in it’s own folder use subdomains?
- Subdomain multisite gives 404 on sub sites
- Add New Sub Site from the WordPress back end then in sub site options table option_value must be with https
- Testing Multisites with vagrant or Can I use multisite with only an IP address (without domain name)
- Changing Multisite URL after the subsite has been in use
- Non-wordpress subdomains on Multisite Installation
- Sub-subdomain getting redirected to main domain
- Possible to create a multisite network where the main site is non-WP?
- On WordPress Network(multisite), Sub Blogs in Subdirectories or Subdomains? What’s better?
- Multisite Subdomain Using More Resources Than Others?
- Changing admin sub-domain in WordPress multisite
- Subdomain login problems
- Get Permalink of Network Blog Post
- Change multi-site installation from sub-domains to sub-directories
- How can I have multiple URLs pointing to single WordPress installation?
- Not able to access dashboard of subdomain
- Wordrpess Subdomains (Multi-Site) without Wildcard
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- Can I use two different domain names with a WordPress multisite network?
- WP MU – Accessing ‘Domain-Mapped’ WP-Admin with a subdomain
- Icon font not working on subdomains of multisite
- WP Multisite – domain mapping to domain.com and separate site to domain.com/help
- Multi-site: removing /blog from posts
- Permalinks not working using wordPress Networking with custom post types
- Redirect subdomain in Multisite installation?
- problem with main site (root domain) redirects to subdomain (multisite)
- How to redirect one page on the subdomain
- Redirect & permalink problems after moving multisite to a new server
- Start with multi-site feature now or later?
- Multisite – 404 when accessing sub-sites
- How to get permalink using get_blog_post function in a multisite?
- Migrating wordpress multisite and domain mapping plugin
- Is the Multi site functionality a viable option for Country and Language targeting?
- Multisite not using subdomains as hostname in from address when sending emails
- ERR_TOO_MANY_REDIRECTS when i config my subdomains
- Redirect to localhost after installing Multisite on server
- Login problems on multisite installation with different domains
- One Domain, Two Installs of WordPress
- MU/Subdomains + Domain Mapping + SSL?
- Is it possible to install WordPress Multisite on a subdomain with subdirectories?
- When creating a multisite, the sub-folders option is not available
- WordPress MU subdomain vhost
- wp_get_attachment_image_src on multisite
- Permalink with a Category and then a Post
- Changed sub-site to its own domain trigger 302 redirects for all page links
- Install multisite wordpress on a subdomain and map to top level domains
- Creating a subdomain network in a subdomain
- WordPress Multisites or Multiple WP Single sites?
- Https and Http Login Issue on WordPress Multisite
- How to use different domains subdomains in WP multisite? [duplicate]
- Should i install multiple wordpress for one site?
- Can’t create a subdomain network – and WP is installed in webroot, not a folder
- Some permalinks are not working and show 404
- Using Same User Database on Subdomain
- Multisite for main in subdirectory, subdomain and subfolders (EN/ES)
- Subdomain is not working
- the_content not working on one of two Multisite sites
- WordPress Multisite Permalinks on mapped domain = server 404 error
- Configure WordPress Multisite Pages with Custom Permalinks
- WordPress Multisite and how to apply sef urls only to specific sites
- How can I have two or more WordPress Pro (paid) themes that form a single website?
- multisite installed on subdomain now want another subsite on subdirectory
- WordPress Multisite loads wrong subdomain dashboard
- After switch domain, some parts of my site still point to my old domain
- WordPress Multisite with Wildcard Certificates not mapping correctly
- Looking for most efficient way to ‘deploy’ single wordpress page to multiple external subdomains
- Multisite installation steps?
- Installing other applications alongside WordPress multisite subdomains
- How to connect existing subdomains to new wordpress multisite?
- WordPress Multisite Network Subdomain
- Multisite WordPress Configurtion
- Using both subdirectory and subdomains in Multisite
- Multisite, different domains, optional subdirectory, and htaccess
- Subdomain Wp-Admin Not Found
- first load of the page gives 404 error
- Some Subdomains on a Multisite Install Not Found
- Is it possible to put a site other than #1 as a Multisite top-level domain?
- Permalinks in Multisite not working
- How to remove index.php from a tag or archive page URL in the root blog?
- Multisite: should /blog go to a 404 page?
- Not being allowed to use some terms in Add New Site in WordPress
- Multi site root site installed on subdomain, with child sites as subdirectories
- Integrating WordPress for blog and other content pages in a web app
- Cookies in Multisite network where sites have their own domain name?
- Multisite subdomain site on secondary domain
- Multisite subdomain microsite on secondary domain
- wordpress multisite with already existing subdomain