Liberal candidate for the Canning byelection Andrew Hastie has slammed the media for targeting his family about their religious beliefs.

The former SAS soldier was on the hustings in Mandurah with former Prime Minister John Howard when he told a gathering of media he wanted to "address some questions about his religion".



Mr Hastie also wanted to put to bed question about his father - a Presbyterian priest - who is understood to have strong leanings towards creationism.



"Today I have some questions to answer about my religion," Mr Hastie said outside the Mandurah Forum shopping centre.

"I'm an Anglican and I make no apology for that.



"However questions have been raised to me by the media which focuses on my wife and my father and I think that is totally unacceptable.

"I won't go into what people ask me about him, because frankly it's not relevant."



Clearly emotional, Mr Hastie said he had no problem with "people coming after him". But he made it clear the media should not target him and not his family.



"The first one pertains to my wife with her work as a receptionist at the local church in Perth where we live close to SAS base," he said.



"In her responsibility as a receptionist in that office she uploaded blogs as published by the pastoral staff.



"A blog was posted in relation to the issue of homosexuality and Ruth was responsible for posting that, but she was not the author of it."



Mr Hastie said he was opposed to same-sex marriage.