```add_query_arg( array( 'downloadid' => $products[$i]['uniqueid'] ), home_url('/') )```

```home_url()``` should suit better due to http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory which cause the difference between both URL functions