# Cannot connect to weaviate in v4 using only url

**URL:** <https://forum.weaviate.io/t/cannot-connect-to-weaviate-in-v4-using-only-url/9661>\
**Category:** Support\
**Tags:** python\
**Created:** [January 10, 2025, 8:41am UTC](https://forum.weaviate.io/t/cannot-connect-to-weaviate-in-v4-using-only-url/9661 "2025-01-10T08:41:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnnTade](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/anntade/32/3339_2.png) [@AnnTade](https://forum.weaviate.io/u/AnnTade)\
**Post date:** [January 10, 2025, 8:41am UTC](https://forum.weaviate.io/t/cannot-connect-to-weaviate-in-v4-using-only-url/9661/1 "2025-01-10T08:41:01Z")

</div>

Hi Everyone. I really need your guys help here!  
I am given a weaviate URL which has been deployed as a web app. I am given the url to it - say its [https://sample-weaviate.myorg.com](https://sample-weaviate.myorg.com) (hiding the url for the sake of security). I am not given any ports or any grcp related data.

I had a version 3 code that could connect to it in the following manner

from weaviate import Client as wClient  
self.weaviate = wClient(WEAVIATE\_ENDPOINT)

Now for version 4, which offers the following ways to connect to it, I am failing miserably, trying to connect to the weaviate instance using just the URL, which I code easily do in v3

- Weaviate Cloud (not the case for me as its not hosted on weaviate cloud)
- Local instances (this seems to pre and post append the port to it, so couldn’t get it to work)
- Custom connections again requires http port, grpc host & port, which I am not provided.
- Embedded Weaviate (not the case for me)

Can anyone please help me by providing the python code to connect to a weaviate instance, provided only the URL? I’m using weaviate client v4.10.2

Your help will be much appreciated. Thanks folks!

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [January 10, 2025, 11:11am UTC](https://forum.weaviate.io/t/cannot-connect-to-weaviate-in-v4-using-only-url/9661/2 "2025-01-10T11:11:49Z")

</div>

hi @AnnTade !!

Welcome to our community 🤗 !!

The python client v4 introduces the GRPC connection. So in order to use it, you need to make sure you server is a recent version (1.25+ should be fine) and has the GRPC port exposed.

Now, if your cluster is under a SSL/TLS endpoint, you need to make sure that both grpc and http endpoints are secure in the client.

Here you can customize your connection. So let’s say you expose http and grpc on different ports, or different domains, etc:

> **[Custom connections | Weaviate](https://weaviate.io/developers/weaviate/connections/connect-custom)**
>
> The Python Client v4 and the TypeScript Client v3 provide helper methods for common connection types. They also provide custom methods for when you need additional connection configuration.

Let me know if that helps!

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [January 10, 2025, 11:12am UTC](https://forum.weaviate.io/t/cannot-connect-to-weaviate-in-v4-using-only-url/9661/3 "2025-01-10T11:12:54Z")

</div>

By the way, to find out the version your server is running, you can hit this endpoint:

[https://sample-weaviate.myorg.com/v1/meta](https://sample-weaviate.myorg.com/v1/meta)

---

<div class="post-metadata">

**Author:** ![AnnTade](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/anntade/32/3339_2.png) [@AnnTade](https://forum.weaviate.io/u/AnnTade)\
**Post date:** [January 10, 2025, 12:23pm UTC](https://forum.weaviate.io/t/cannot-connect-to-weaviate-in-v4-using-only-url/9661/4 "2025-01-10T12:23:52Z")

</div>

that was really helpful. Thank you! and is there a way to check is gRPC ports are being exposed? Also to use custom connections function to connect  
my http\_host would be the url of the weaviate and the port would be something like 8080. Is that correct?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [January 23, 2025, 2:47pm UTC](https://forum.weaviate.io/t/cannot-connect-to-weaviate-in-v4-using-only-url/9661/5 "2025-01-23T14:47:20Z")

</div>

hi @AnnTade !!

Sorry for the late response here. I was out on 🏖 vacations 🙂

Here I have written some examples on how to check the availability for both endpoints using `curl` and `grpcurl` and also when behind a reverse proxy serving TLS/SSL like traefik:

> [@Weaviate with Traefik and gRPC](https://forum.weaviate.io/t/weaviate-with-traefik-and-grpc/1238/3):
>
> Hi @qnlbnsl ! Sorry for the delay here. Looks like I was finally able to tame this Here is what I got: NOTE: [Check this updated gist on how to correctly expose Weaviate under SSL/TLS using Traefik and running everything with a docker compose](https://gist.github.com/dudanogueira/0dd925cbf63397e256e84e991245aab3/edit) --- version: '3.4' services: weaviate: command: - --host - 0.0.0.0 - --port - '8080' - --scheme - http image: semitechnologies/weaviate:1.23.5 #ports: # - 8081:8080 # unsafe http # - 50052:50051 # unsafe grpc…

Maybe that doc can help you on this.

Let me know if that helps!

Happy coding/deploying!
