> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kintsu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress REST API (wp-json) returning 404

> Fix the wp-json 404 error that prevents your WordPress site from connecting to Kintsu AI.

## Symptoms

* Can't connect your site to Kintsu
* Visiting `yoursite.com/wp-json/` shows "Not Found"
* WordPress Site Health shows: "The REST API encountered an unexpected result"
* Your homepage works but other pages may not

## Cause

Your server's Apache configuration is ignoring WordPress's `.htaccess` rewrite rules. This is common on unmanaged hosting providers like Hetzner, DigitalOcean, and AWS EC2, where Ubuntu ships with `AllowOverride None` by default.

## Quick check

Visit `yoursite.com/wp-json/` in your browser. If you see an Apache "Not Found" page instead of JSON data, this guide applies to you.

## Fix (if you have SSH access)

<Steps>
  <Step title="Open the Apache config">
    ```bash theme={null}
    sudo nano /etc/apache2/apache2.conf
    ```
  </Step>

  <Step title="Find the /var/www/ directory block">
    Look for this block:

    ```apacheconf theme={null}
    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
    ```

    Change `None` to `All`:

    ```apacheconf theme={null}
    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
    ```
  </Step>

  <Step title="Restart Apache">
    ```bash theme={null}
    sudo systemctl restart apache2
    ```
  </Step>

  <Step title="Re-save permalinks">
    In WordPress, go to **Settings → Permalinks** and click **Save Changes**.
  </Step>
</Steps>

## Fix (if you don't have SSH access)

Send this to your hosting provider's support:

<Note>
  "WordPress REST API URLs (`/wp-json/`) are returning 404. Please change `AllowOverride None` to `AllowOverride All` for the `/var/www/` directory in the Apache configuration and restart Apache."
</Note>

## After fixing

Visit `yoursite.com/wp-json/` again — you should see JSON data instead of a 404. Then reconnect your site in Kintsu.
