Change HTTP status code of Fallback page

Frank_Geldof1
Level 4

Change HTTP status code of Fallback page

When the fallback page is accessed it returns as:

Status Code - 200 OK

We would like to see it return as:

Status Code - 404 Not Found

According to Marketo support it is not possible to change this as it needs to be set on web server (which is shared).

Does anyone know if there are other possibilities to get the Fallback page to return with a 404 status code?

Thanks!

/// Frank
7 REPLIES 7
Jay_Jiang
Level 10

Re: Change HTTP status code of Fallback page

Not entirely clear what your situation is and what you're trying to achieve.

Taking a stab though, since you set the fallback page in Admin, can't you just send it to a broken link?

pastedImage_0.png

Jay_Jiang
Level 10

Re: Change HTTP status code of Fallback page

If you specifically want the header with 404, create a page where you set the header and host it on your web server and point the fallback page to it

e.g. in php:

<?php

http_response_code(404);

?>

Frank_Geldof1
Level 4

Re: Change HTTP status code of Fallback page

Jay Jiang Thanks for the response - sorry I forgot to mention that the Fallback Page is a Marketo page.

/// Frank
SanfordWhiteman
Level 10 - Community Moderator

Re: Change HTTP status code of Fallback page

If the fallback page exists as a Marketo LP, it can't also be a "friendly" 404 page.

Like Jay says, you have to point the person to a page that gens an actual HTTP 404. You could perhaps use one of the hosted status page services.

Jay_Jiang
Level 10

Re: Change HTTP status code of Fallback page

What you can do is put the marketo landing page in an iframe of your own hosted page

<?php

http_response_code(404);

?>

<html>

<body style="padding:0px;margin:0px;">

<iframe src="https://cname.domain.com.au/marketo_landing_page.html" width="100%" height="100%" border="0"></iframe>

</body>

</html>

SanfordWhiteman
Level 10 - Community Moderator

Re: Change HTTP status code of Fallback page

Thing is, if the HTTP 404 is so the page is deindexed by search engines, this won't help.

I assume it must have something to do with search, as end users don't care about the actual HTTP status if the page has a giant "404" on it.

Frank_Geldof1
Level 4

Re: Change HTTP status code of Fallback page

Thanks Sanford and Jay for you insights - I will circle your input back to our Web specialists and see what will be the best solution for us. I will place an update when we have decided what to do.

/// Frank