The swine flu outbreak dealt Mexico a cruel blow, but as tourists begin to return south of the border, Simon Calder outlines some coastal treats to be had in this vibrant, diverse country

Is it safe?

That depends what you mean by "safe". Last week the Foreign Office withdrew its "no-go" advice, saying: "Following a decline in the number of reported new swine influenza cases in Mexico since its peak on 26 April 2009, we no longer advise against all but essential travel". While many other threats prevail, you can be fairly sure of a friendly welcome to the beautiful coastline of this vast country.

The traveller will discover dramatic coastal scenery, laid-back resorts and aquatic playgrounds – not to mention hundreds of fabulous beaches. Wherever you end up, though, bear in mind that, although the water may look lovely, there is often a dangerous undertow – presenting much more of a risk to the traveller than swine flu.

Where do I start?

Cancún, where the majority of British visitors to Mexico arrive on charter flights from the UK, mainly operated as part of packages offered by Thomson (0871 231 4691; ) and Thomas Cook (0844 412 5970; ). The airport is about 15 miles south of the town of Cancún, but the name also refers to the 12-mile island stretching down the coast a short way offshore. The sand is made up of powdered fossils that don't retain the heat and stay cool throughout the day.

Between the Caribbean on one side and a tropical lagoon on the other are all the bars, restaurants and shops you could want. Cancú*is closer to Miami than it is to Mexico City – and sometimes it shows. But there is one big difference between Cancú*and other Caribbean holiday hotspots: you can step straight from the sand to an ancient Mayan temple in the garden of the Park Royal Piramides (00 52 998 885 1333; ). It's a relatively small structure compared with the giant hotels all around it, built with limestone and gently crumbling in parts, which is hardly surprising given its age: it is over 500 years old.

A 100-mile stretch of coastline south from Cancú*has been branded the "Riviera Maya". Down the coast in Playa del Carmen, the second major resort, you will be hard-pressed to find much evidence of Mayan culture, though at the Yaxche restaurant ( ), you can sample Mayan dishes. Start with cornbread filled with chaya (tree spinach), then moved on to a strange brown broth called "a tribute to Mother Earth". Among the new breed of boutique hotels, Mosquito Blue in Playa del Carmen (00 52 984 873 1245; ) offers chic quarters, with doubles from around $125 (£90) including breakfast.

This is also the jumping-off point for Cozumel, served by frequent ferries – and also by some direct charter flights from the UK. The reefs off the coast of this island offer some of the best diving in the world. If you're just looking for a good beach, head to the less developed east coast.

The other big aquatic attraction on the Mayan Riviera is the cenote, or limestone sinkhole. The most organised "cenote experience" is at Xcaret, just outside Playa del Carmen. Here you can swim in a subterranean river or visit a recreated Mayan village. Entrance costs US$69 (£50); it is open 8.30am-10pm daily (00 52 998 881 2400; ).

A sense of history

By far the most impressive ruins on the Mayan Riviera are those at Tulum, a fortified coastal town 60 miles south of Playa del Carmen. Tulum is an ancient Mayan city turned backpacker hangout turned international resort. Like many of the settlements along the coast, its inhabitants exchanged honey, salt and fish for cotton and conches.

Entrance to the site is through a gap in the walls that surrounded the city on three sides; on the fourth side is the Caribbean. Inside are several groups of buildings, including a palace, residential dwellings and temples. The most remarkable of these is the Temple of the Frescos, whose inner walls – partially restored to their original green and red colours – are decorated with murals of a goddess in the underworld. This is thought to have been one of the last monuments built by the Maya before their conquest by the Spanish. The site is open 8am-5pm daily (00 52 983 837 2411), admission 35 pesos (£2). As with all the big Mayan sites within day-trip range of Cancún, the bus-borne crowds tend to arrive at around 10am and stay until 3pm. It is therefore well worth visiting in the first or last couple of hours of the day, which is easier if you stay overnight.

Along the shoreline running south from the ruins at Tulum, there are plenty of accommodation possibilities, from US$10 (£7) for a hammock to luxury-resort doubles from US$300 (£210).

Try the Hotel Zamas (001 415 387 9806; ), owned by two San Franciscans with an eye for quirky Mexican styling. Cabanas start at US$100 (£70) per night.

Where next?

The north coast of the Yucatá*Peninsula and the Gulf shore that curls around via Veracruz eventually to reach the Texan border is not outstanding territory. Most British travellers flip (to use the verb du jour) to the Pacific coast. The superb shoreline of western Mexico extends for over 4,000 miles from the frontier with Guatemala to the US border at San Diego.

The coastal highway along Mexico's Pacific shore constitutes an inspiring journey between the mountains and the oceans, through a succession of sleepy towns and languid cities. The average off-the-beaten-track village is a picture of indolence, ranged raggedly around a Plaza Major where only the church peeks above shoulder height.

For a "real" resort, aim for Huatulco; it's Mexico, amigo, but not as most tourists know it: basically a collection of glorious bays backed by untouched forest. Man has trodden gently on these squeaky clean Pacific shores, with low-impact hotels and strict limits on development. The hub of Huatulco is the town of La Crucecita, which is within walking distance of the shore – and the port of Santa Cruz, which has a number of hotels.

Watersports abound, with snorkelling and surfing particularly popular; Huatulco is part of the only stretch of Mexico's Pacific coast that faces south-east, and certain locations are about as surf-sure as any in the world.

Along the coast you reach the travellers' colonies of Puerto Escondido and Puerto Angel. The former is not quite the "forgotten port" that its name suggests, since it is now fairly developed. But it is an ideal base for relaxing at locations such as the Acuario Bungalows & Cabanas (00 52 954 582 0357), which boasts an internet café and a weights room; cabanas start at 250 pesos (£16), including breakfast.

You can sign up for a five-day PADI diving course at Aventura Submarina (00 52 582 2353), which costs around US$400 (£230). Puerto Escondido is also popular with surfers. Puerto Angel is quieter, though the beaches can be adversely affected by pollution after heavy rain, and also have strong tides.

Going loco?

In "spring break", when many Mexican resorts are overrun by US college students, one of the wildest places is Acapulco. And at weekends throughout the year, it can appear to be Mexico City-on-Sea, when many of the capital's residents flood in by road or air. The historic centre has almost been obliterated under the new developments, which is a shame: this was once one of the most important ports in the Spanish colonies. Galleons would sail from here across the Pacific to China and the Philippines. It was connected to the Atlantic by the Camino de Asia to Mexico City and the Camino de Europa from there to Veracruz on the Gulf of Mexico. You can find out more at the impressive Fuerte de San Diego, home to the Historical Museum (00 52 482 3828; open 10am-5pm daily except Monday, admission US$3/£2.10).

The big event here is the diving display that takes place five times a day from the cliffs at La Quebrada ("the ravine"), at the western end of town . The cliff divers, known as clavadistas, plunge from perches u omore than 100 feet above the ocean; by the time they hit the water, they are travelling at over 75mph. Performances take place at 1pm, then hourly from 7.30pm to 10.30pm, admission around 40 pesos (£2.50).

A touch of glamour?

Go further north and west along the coast to the superb Bay of Banderas, which boasts some of the best beaches on the Pacific – plus one of the most interesting towns, Puerto Vallarta.

The people largely responsible for its popularity were Elizabeth Taylor and Richard Burton, who made the resort fashionable when they came here to film Night of the Iguana in 1963. The film itself didn't exactly end up knee-deep in Oscars, but they set a trend for visiting the region. You can visit their love shack – Casa Kimberley, just up the hill from the centre of the resort at Calle Zaragoza 445 (00 52 322 222 1336; ). A house that's seen more than its fair share of passion has double rooms for just US$75 (£52), including breakfast, in the low season from June to November.

Take a boat trip to the Marietas Islands: an all-day excursion that includes snorkelling and kayaking. The trip costs US$70 (£50) through Vallarta Adventures (00 52 322 297 1212; ).

The end of the line?

Try Topolobampo, which besides an amusing name boasts good transport connections. It is close to the city of Los Mochis, which is one end of Mexico's only remaining long-distance passenger train: the dramatic Copper Canyon Railway to the highland city of Chihuahua. To book a trip, contact a specialist agency such as Cathy Matos Mexican Tours (020-8492 0000; ). You can also take a ferry from Topolobampo to the port of La Paz at the southern tip of Baja California, with Baja Ferries (00 52 612 125 7443; ).

Baja California is a fascinating part of Mexico's Pacific coast. It is a sparsely populated finger of land jabbing 1,000 miles down into the Pacific – longer than Italy and varying in width from 30 to 150 miles. To the west is the Pacific, to the east the Sea of Cortez. Baja has many beautiful beaches, particularly in the Los Cabos area, around Bahía Concepción (close to Mulege), and near to La Paz. You can fish, dive, surf, whale-watch, bird-watch, or perhaps study centuries-old cave paintings.