Pagination on template page for custom query redirecting to index.php

Ok the issue was that the page slug was the same name as the post type. Changing the post type from ‘blog’ to ‘blogposts’ solved it.