Guides
Attaching to a Database over HTTPS
To connect to a DuckDB database via HTTPS, use the [`ATTACH` statement](#docs:sql:statements:attach) as follows:  
```sql
ATTACH 'https://blobs.duckdb.org/databases/stations.duckdb' AS stations_db;
```  
> Since DuckDB version 1.1, the `ATTACH` statement creates a read-only connection to HTTP endpoints.
> In prior versions, it is necessary to use the `READ_ONLY` flag.  
Then, the database can be queried using:  
```sql
SELECT count(*) AS num_stations
FROM stations_db.stations;
```  
| num_stations |
|-------------:|
| 578          |