# validate_url_sync

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/_security/_policy/validate_url_sync)

Synchronous URL validation (no DNS resolution).

Suitable for Pydantic validators and other sync contexts. Checks scheme
and hostname patterns only - use `validate_url` for full DNS-aware checking.

## Signature

```python
validate_url_sync(
    url: str,
    policy: SSRFPolicy = SSRFPolicy(),
) -> None
```

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/d2931d878fd39f9dcfef78911056ecef3271ee71/libs/core/langchain_core/_security/_policy.py#L271)