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

# Custom Subdomains (Proxy)

> How to use your own subdomain instead of arminterview.my

# Custom Subdomains via Proxy

By default, your company's job board is accessible at `arminterview.my/companies/your-company-slug`. However, you can use your own custom subdomain (e.g., `careers.yourcompany.com`) to provide a more professional, branded experience for your candidates.

## Benefits of Custom Subdomains

* **Brand Trust**: Candidates feel more secure applying on a domain they recognize.
* **Unified Experience**: Seamlessly integrate your job board into your main website navigation.
* **Improved SEO**: Leverage your main domain's authority for your recruitment landing pages.

## Setup Instructions

To use your own subdomain, you need to set up a reverse proxy or point your DNS to our servers.

### 1. DNS Configuration (CNAME)

The simplest way to set up a custom subdomain is via a CNAME record. This allows us to handle SSL and routing automatically.

| Type  | Host      | Value             |
| ----- | --------- | ----------------- |
| CNAME | `careers` | `arminterview.my` |

> \[!NOTE]
> After adding the CNAME record, it may take up to 24 hours for DNS changes to propagate globally.

### 2. Reverse Proxy Configuration

If you prefer to maintain full control over the traffic or are integrating into an existing application, you can use a reverse proxy.

#### Example: Nginx

Use this configuration if you are running your own web server.

```nginx theme={null}
server {
    listen 80;
    server_name careers.yourcompany.com;

    location / {
        proxy_pass https://arminterview.my/companies/your-company-slug;
        proxy_set_header Host arminterview.my;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_ssl_server_name on;
    }
}
```

#### Example: Next.js Rewrites

If you have an existing Next.js application, you can proxy the traffic using the built-in rewrite engine.

```javascript theme={null}
// next.config.js
module.exports = {
  async rewrites() {
    return [
      {
        source: '/careers/:path*',
        destination: 'https://arminterview.my/companies/your-company-slug/:path*',
      },
    ]
  },
}
```

## Troubleshooting & FAQ

<AccordionGroup>
  <Accordion title="Does ArmInterview provide SSL for custom domains?">
    Yes. If you use the CNAME method, we automatically provision and renew Let's Encrypt SSL certificates for your subdomain.
  </Accordion>

  <Accordion title="I'm getting a 404 error after setup.">
    Ensure that your **Custom Slug (URL)** in the Dashboard match exactly with the `your-company-slug` used in your proxy settings.
  </Accordion>

  <Accordion title="Can I use a root domain instead of a subdomain?">
    We recommend using a subdomain (like `careers.`) as root domains (A records) require static IP addresses which may change. CNAMEs are much more reliable.
  </Accordion>
</AccordionGroup>

> \[!IMPORTANT]
> Always verify that your proxy passes the `Host` header correctly as `arminterview.my`, otherwise our routing engine will not be able to identify the incoming request.
