The climate here has not always been as harsh and parched as it is today. Indeed for thousands of years the now arid Caspian coast was alive with forests and wildlife. Neolithic man also found it conducive to good hunting and depicted various animal forms in the dwelling caves above today's Gobustan. Erosion and the subsequent colpse of the outer caves has revealed thousands of carved figures shamen, cattle deer, and most famously, an ancient ship which Thor Heyerdhal came to examine. Could it suggest an ancestral link with the Vikings? The oldest stone-age petroglyphs are deeper and more rounded than the later iron-age ones cut with metal blades. Photos that show these images standing out starkly in white are taken after filling the carvings with toothpaste to improve the contrast. In situ some are rather harder to make out. Similar figures were discovered on the territory of Uzbekistan (Sarmish-say) and the Arabian Peninsula.
For a negotiable donation guides can show you all the most interesting figures including, close to the little museum, a miniature 'tambourine stone' (Gabal Dash), which resounds like a drum when hit. Reaching the full-size version requires a major hike into the hills. NB: on summer weekends the main site can be noisy and crowded, while on autumnal evenings the mood is meditative and lonely.
En route from Gobustan town it's worth a brief detour to see a fenced rock towards the prison on which a bored centurion scribbled some lines of graffiti with his spear around 2070 years ago. This is the furthest east such a Latin inscription has ever been discovered.
Now as to how to get there. That won't be easy to do it independetly and having a car is the ideal option. There are buses that go to Qobustan, where you can hire a local taxi to take you to the volcanoes. Don't take one from baku as they don't knwo where the volcanoes are. You can take a bus (they are usually picked up in Bayilovo area. You'd better ask locals for the bus N. Just tell the driver where you going and he will you know when it is to get off. The sign to Gobustan is well marked but the place is not near the main road and it will take you a goo 30-45 min walking to get there. There are usually a group of taxi drivers waiting at the place where you most likely would be dropped off and you can negotiate with them to take you to Gobustan, that should not be expensive. Getting to mud volcanoes from Qobustan will definitely require a car. In the first place you will need to have a person who knows where they are located and how to get there, as there are no signs at all and tourist will unlikely find them on his own. Besides it is quite far from Gobustan and doing it without car is quite unrealistic, unless you want to be walking around in the desert for hours. Whilst in Gobustan you can again negotiate a price with a driver to take you to volcanoes and then either take you back to Baku or drop at the main highway where you can catch a return bus to Baku. On the way back to Baku, stop the Bibi-Heybat Mosque (known locally as Fatima al zahra mosque).
If you're planning a trip to Azerbaijan you may be interested ▶ Azerbaijan highlights - For those who prefer to go unbeaten path, to explore less visited places and check national charisma of this small country in Southern Caucasus on the edge of Europe.