I understand this a popular issue, and I have read all the similar questions here on Stack Overflow and other sites (including the datatables website).
To clarify, I
If you are using ajax as a function remember it expects JSON data to be returned to it, with the parameters set.
$('#example').dataTable({ "ajax" : function (data, callback, settings) { callback({ data: [...], recordsTotal: 40, recordsFiltered: 40} )); } })