"An example of this is Wanganui and Whanganui - either of which can be used in official documentation following the passing of this legislation," said Mr Williamson.
The Government reached a compromise in 2009 between local iwi and other residents, that Wanganui could be spelled with or without an h.
Land Information Minister Maurice Williamson announced the same year the official geographic name for the city could be either 'Wanganui' or 'Whanganui'. The New Zealand Geographic Board decided the spelling should be changed to the Maori version, Whanganui, but locals voted four to one against.
At the time Mr Williamson said the compromise would avoid getting the Maori Party offside, while leaving opponents with the option of continuing with the h-less spelling. Government agencies were told to include the "h" as soon as they could.
Two referendums were held on the issue, in 2006 and 2009, and results were in favour of keeping the spelling as Wanganui.
Maori Party co-leader Tariana Turia said a law change recognising the alternative official geographic name of 'Whanganui' was a long time coming.
Mrs Turia said 'Whanga' meant to wait and 'nui' meant long. "We're thrilled because that's about our identity as people.
"We don't spell what without an h, or when without an h, and it is about our dialect; our identity.
"I think today of the long wait for Whanganui iwi for the correct spelling on Whanganui to be recognised. There have been local body referenda, District Court meetings and submissions to the New Zealand Geographic Board.
"I am pleased that the decision reinforces the integrity of the Maori language, as well as restoring the mana of Whanganui iwi."