Title: host-meta
Author: Matthias Pfefferle
Published: <strong>اپریل 20, 2010</strong>
Last modified: ستمبر 25, 2026

---

Search plugins

![](https://ps.w.org/host-meta/assets/banner-772x250.png?rev=2815156)

![](https://ps.w.org/host-meta/assets/icon-128x128.png?rev=2815156)

# host-meta

 By [Matthias Pfefferle](https://profiles.wordpress.org/pfefferle/)

[Download](https://downloads.wordpress.org/plugin/host-meta.1.4.0.zip)

 * [Details](https://bcc.wordpress.org/plugins/host-meta/#description)
 * [Reviews](https://bcc.wordpress.org/plugins/host-meta/#reviews)
 *  [Installation](https://bcc.wordpress.org/plugins/host-meta/#installation)
 * [Development](https://bcc.wordpress.org/plugins/host-meta/#developers)

 [Support](https://wordpress.org/support/plugin/host-meta/)

## Description

When an app or service wants to connect to your site, it first has to find out what
your site supports. Where are the feeds? Is there an API? Can it look up the people
who write here?

host-meta is a small file that answers these questions. It always lives at the same
address, `/.well-known/host-meta`, so apps know where to look. The format is an 
[internet standard](https://www.rfc-editor.org/rfc/rfc6415).

This plugin adds that file to your WordPress site. You don’t have to do anything
else, there are no settings.

### Why would I need it?

Most visitors never see it. It is for other software. You need it if a plugin or
service asks for it, for example:

 * The [WebFinger](https://wordpress.org/plugins/webfinger/) plugin can add a link
   to it, so older apps can still find the profiles of your authors.
 * The [Open Search Document](https://wordpress.org/plugins/open-search-document/)
   plugin adds your site search to it.
 * Feed readers and other tools can use it to find your feeds and the WordPress 
   API.

### What is in the file?

 * Links to your feeds (Atom, RSS and RDF)
 * A link to the WordPress REST API
 * A link for blogging apps (RSD)
 * Your site icon, if you set one under _Appearance > Customize > Site Identity_
 * Your privacy policy, if you published one under _Settings > Privacy_
 * Everything other plugins add to it

The file comes in two versions: XML at `/.well-known/host-meta` and JSON at `/.well-
known/host-meta.json`. Both have the same content.

Logo by [Eran Hammer](https://web.archive.org/web/20091130230307/http://hueniverse.com/2009/11/host-meta-aka-site-meta-and-well-known-uris/)

## Installation

Follow the normal instructions for [installing WordPress plugins](https://wordpress.org/documentation/article/manage-plugins/#installing-plugins-1).

### Automatic installation

 1. In your WordPress admin, go to _Plugins > Add New Plugin_.
 2. Search for “host-meta”.
 3. Click _Install Now_ and then _Activate_.

That’s it, there are no settings.

### Manual installation

You only need this if your site can’t install plugins on its own, or if you want
to try the [latest development version](https://github.com/pfefferle/wordpress-host-meta).

 1. Download the plugin from [WordPress.org](https://wordpress.org/plugins/host-meta/)
    or from the [GitHub releases](https://github.com/pfefferle/wordpress-host-meta/releases).
 2. Unzip it. You should get a folder called `host-meta`.
 3. Upload that folder to `wp-content/plugins/` on your server, for example with an
    FTP program.
 4. In your WordPress admin, go to _Plugins_ and click _Activate_ below “host-meta”.

Please make a backup of your site before you install plugins by hand.

### Installation with Composer

If you manage your site with Composer, you can install the plugin from [Packagist](https://packagist.org/packages/pfefferle/wordpress-host-meta):

    ```
    composer require pfefferle/wordpress-host-meta
    ```

Or from [WPackagist](https://wpackagist.org/search?q=host-meta), which mirrors the
WordPress.org version:

    ```
    composer require wpackagist-plugin/host-meta
    ```

Composer puts the plugin into your plugins folder, you still have to activate it.

### After the installation

The plugin needs “pretty” permalinks. If your addresses look like `?p=123`, go to
_Settings > Permalinks_ and pick any other option, for example “Post name”.

Then open `https://yoursite.com/.well-known/host-meta` (with your own domain) to
check that it works.

## FAQ

### How do I check that it works?

Open `https://yoursite.com/.well-known/host-meta` in your browser (with your own
domain). You should see a short XML file with some links.

### I get a “Page not found” error

WordPress probably did not pick up the new address yet. Go to _Settings > Permalinks_
and click _Save Changes_. Then try again.

If your permalinks are set to “Plain” (addresses like `?p=123`), the file can’t 
work. Pick any other option there, for example “Post name”.

If it still does not work, your web server might block addresses that start with
a dot (like `/.well-known/`). Your hosting provider can help with that.

### Does it change anything on my site?

No. Your pages, posts and theme stay the same. The plugin only adds the file.

### I am a developer, can I add my own links?

Yes, with the `host_meta` filter. The data uses the JSON format (JRD), the plugin
creates the XML version from it.

    ```
    function custom_host_meta( $host_meta ) {
        $host_meta['links'][] = array(
            'rel'      => 'lrdd',
            'type'     => 'application/jrd+json',
            'template' => 'https://example.com/.well-known/webfinger?resource={uri}',
        );

        return $host_meta;
    }
    add_filter( 'host_meta', 'custom_host_meta' );
    ```

For the XML version only, there are two more actions: `host_meta_ns` adds namespaces
to the root element and `host_meta_xrd` adds elements right before the closing tag.
Both expect you to echo your output:

    ```
    function custom_host_meta_ns() {
        echo ' xmlns:foo="https://example.com/ns"';
    }
    add_action( 'host_meta_ns', 'custom_host_meta_ns' );
    ```

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“host-meta” is open source software. The following people have contributed to this
plugin.

Contributors

 *   [ Matthias Pfefferle ](https://profiles.wordpress.org/pfefferle/)

[Translate “host-meta” into your language.](https://translate.wordpress.org/projects/wp-plugins/host-meta)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/host-meta/), check 
out the [SVN repository](https://plugins.svn.wordpress.org/host-meta/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/host-meta/) by [RSS](https://plugins.trac.wordpress.org/log/host-meta/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

### 1.4.0

 * Moved the code into the `Host_Meta` namespace, the global `Host_Meta` class still
   works but is deprecated
 * Namespaces added with `host_meta_ns` no longer end up inside the `xmlns` attribute
 * Aliases like `acct:` URIs and property values are no longer dropped by the URL
   escaping
 * Properties with a `null` value are rendered with `xsi:nil`
 * URLs in the JSON version are no longer HTML encoded
 * The rewrite rules only match the exact well-known URLs
 * Requires WordPress 6.4 and PHP 7.4
 * Added links to the site icon and the privacy policy
 * Removed the outdated translation template, WordPress.org provides the translations
 * Added tests and a new readme

### 1.3.2

 * update requirements

### 1.3.1

 * fixed “flush rewrite rules”

### 1.3.0

 * complete refactoring
 * updated dependencies

### 1.2.2

 * updated escaping methods
 * small changes

### 1.2.1

 * WordPress coding stye
 * added missing „static“ to init function

### 1.2.0

 * added WP-API discovery
 * added RSD discovery

### 1.1.0

 * removed deprecated `hm` namespace and items
 * WordPress coding standard

### 1.0.4

 * some small bug-fixes

### 1.0.3

 * better compatibility with other plugins

### 1.0.2

 * bug fix

### 1.0.1

 * bug fix

### 1.0.0

 * refactoring
 * deprecated well-known plugin

### 0.4.3

 * implemented new well-known hooks

### 0.4.2

 * some changes to support http://unhosted.org

### 0.4.1

 * fixed ostatus compatibility issue: http://status.net/open-source/issues/3235

### 0.4

 * added jrd support

### 0.3

 * implements the new well-known hook

### 0.2

 * Initial release

## Meta

 *  Version **1.4.0**
 *  Last updated **1 day ago**
 *  Active installations **70+**
 *  WordPress version ** 6.4 or higher **
 *  Tested up to **7.1.2**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/host-meta/)
 * Tags
 * [discovery](https://bcc.wordpress.org/plugins/tags/discovery/)[fediverse](https://bcc.wordpress.org/plugins/tags/fediverse/)
   [host-meta](https://bcc.wordpress.org/plugins/tags/host-meta/)[Webfinger](https://bcc.wordpress.org/plugins/tags/webfinger/)
   [well-known](https://bcc.wordpress.org/plugins/tags/well-known/)
 *  [Advanced View](https://bcc.wordpress.org/plugins/host-meta/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/host-meta/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/host-meta/reviews/)

## Contributors

 *   [ Matthias Pfefferle ](https://profiles.wordpress.org/pfefferle/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/host-meta/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://notiz.blog/donate/)