Redirects With Yoast SEO

Where is the best location to place redirects in site available file? Does the order matter where you place the redirects?

I have enabled the yoast seo redirect urls and wanted to know If its best to place the redirects in the sites available. When placing the redirects file toward the end of the file, it caused an error where it crashed nginx and I would get a server error.

Site is Wordpress with W3tc - PHP 5.6

Since Yoast is very popular, maybe others had this issue can help.

Thanks in advance.