# Blog on Your Own Site

> Show your Proferex blog under a path of a website you already run, such as yourdomain.com/blog.

This page shows you how to put your blog under a path of a website you already run, such as `yourdomain.com/blog`. Your website stays where it is. You add one proxy rule to it, and your blog appears at that path with your site's domain in the address bar.

Use this when you want the blog to build up your main domain in search. If a separate address is fine, such as `blog.yourdomain.com`, a [Blog Domain](/docs/blog/blog-domain/index.md) is quicker to set up.

To set it up, go to **Blog → Blogs**, open the menu on the blog's row and click **Domains**. The section is called **Show this blog on your own site**.

---

## Connect your site

1. Type the full address where the blog should appear, for example `https://yourdomain.com/blog`. It must start with `https://`.
2. Click **Connect**.
3. Proferex shows the address to forward that path to, and a ready-made rule for **Nginx**, **Cloudflare** and **Next.js / Vercel**. Your values are already filled in.

A blog can be shown on one website at a time.

---

## Add the proxy rule

Add the rule to the server or CDN that hosts your website. Every request under your blog path must go to the address Proferex shows, with the rest of the path and the query string kept as they are.

- **Nginx.** Paste both `location` blocks into your site's `server` block, then reload Nginx.
- **Cloudflare.** Create a Worker with the code shown, and add a route for your blog path, such as `yourdomain.com/blog*`. Your domain must be on Cloudflare.
- **Next.js or Vercel.** Add both rewrites to `next.config.js` and deploy.

Use another host? Any reverse proxy works if it forwards the path the same way. The Nginx rule is the clearest example to copy from.

Pass the reader's address on, as the ready-made rules do. Blog analytics use it to tell where readers are. A self-hosted Next.js server doesn't pass it on, so those readers show your server's location instead.

---

## Check the connection

Once your rule is deployed, Proferex checks the connection on its own every 20 seconds while the **Domains** page is open. It opens your blog address and confirms it reaches your blog. To check right away, click **Check now**.

When the check passes, the section shows **Live**. From then on, search engines see your site's address as the blog's address: in canonical links, social previews and the sitemap. Until then, the section shows **Not live yet** and your blog keeps its current address in search results. This protects your rankings while the rule is still being set up.

If the check fails, the section tells you why:

| Message | What to do |
|---|---|
| The address doesn't reach your blog yet | The rule isn't live, or it forwards to the wrong address. Check it and deploy it. The next check picks it up. |
| The address redirects | Your site sends the blog path somewhere else, for example from `yourdomain.com` to `www.yourdomain.com`. Connect the address your site actually serves, or forward the path without a redirect. |
| It reaches a different Proferex blog | The rule uses another blog's address. Copy the address from this blog's page again. |
| We couldn't reach the address | Check the address is right and your site is online. |

If you change the blog address later, the checks start again. The new address goes live only once a check passes.

---

## Help search engines find it

Your blog's sitemap is at your blog address followed by `/sitemap.xml`, for example `yourdomain.com/blog/sitemap.xml`. Add it to your website's `robots.txt`:

```
Sitemap: https://yourdomain.com/blog/sitemap.xml
```

If your site uses Google Search Console, submit the same sitemap there.

---

## Disconnect

To stop showing the blog on your site, click **Disconnect** and confirm. Your proxy rule then returns an error page, so remove it too. Pages indexed under your site's address may lose their rankings, so disconnect only if you are moving the blog for good.

---

## Next step

Once the section shows **Live**, open your blog address and click through a few articles. To write your first article, see [Articles](/docs/blog/write-and-publish/index.md).
