# Route prefix is not respected from serve config yaml file

**URL:** https://discuss.ray.io/t/route-prefix-is-not-respected-from-serve-config-yaml-file/13666
**Category:** Ray Serve
**Created:** [February 8, 2024, 7:13am UTC](https://discuss.ray.io/t/route-prefix-is-not-respected-from-serve-config-yaml-file/13666 "2024-02-08T07:13:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chhaya\_kumar\_das](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/chhaya_kumar_das/32/1175_2.png) [@chhaya\_kumar\_das](https://discuss.ray.io/u/chhaya_kumar_das)
#### Post date: [February 8, 2024, 7:13am UTC](https://discuss.ray.io/t/route-prefix-is-not-respected-from-serve-config-yaml-file/13666/1 "2024-02-08T07:13:08Z")

</div>

I generated a yaml file using the below command

```auto
 serve build app:app -o config.yaml

```

In the yaml file I changed the route prefix. Now it looks something like this

```auto
applications:
- name: PredictionServer
  route_prefix: /predict
  import_path: app:app
  runtime_env: {}
  deployments:
  - name: ModelServer
    user_config:
      engine: hf
      model_path: "path-to-hf-model"

```

The problem here is my endpoint is available both on `127.0.0.1:8000/predict` as well as `127.0.0.1:8000/`. Why is it serving with 2 endpoints when I have specified only one in the yaml file? Is there something that needs to be corrected on my side.

This is the code in my file

```auto
import ray 
from ray import serve
from starlette.requests import Request

@serve.deployment
class ModelServer:

    def __init__ (self):
        self.dummy_response = "Hello world"

    async def __call__ (self, request: Request) -> str: 
        return "Hello world"

app = ModelServer.bind()

```

Any help is appreciated.

---

<div class="post-metadata">

### Author: ![chhaya\_kumar\_das](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/chhaya_kumar_das/32/1175_2.png) [@chhaya\_kumar\_das](https://discuss.ray.io/u/chhaya_kumar_das)
#### Post date: [February 8, 2024, 10:19am UTC](https://discuss.ray.io/t/route-prefix-is-not-respected-from-serve-config-yaml-file/13666/2 "2024-02-08T10:19:21Z")

</div>

Was using the wrong command got fixed using serve run
