I need to do a permanent targeting via servlet in java, with the following code:
Here it directs with status 301
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location", "https://google.com.br");
Here it directs with status 200
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location", "https://www.google.com.br");
Does anyone know why they do not have the same behavior? I'm having trouble directing to other domains, where they always get 200 status.