404 with Wordpress and GitHub Pages - wordpress

I have wordpress on the Github pages, what I like to do is to set custom 404 error page created with Wordpress.
But every plugin doesnt work for me. I can use any plugin to set custom 404 page, but it will open the default github pages 404 page.
Also I want to create Redirections with Redirection plugin, but it also doesnt work for me it wont open the url I have set, it will open default 404 github page.
I'm using Wordpress 5.6.
Can you help me to solve this problem?

If you want to redirect your Error 404 page, then make a file called "404.html". And paste the code:<meta http-equiv="refresh" content="0;url=https://new-page-url.com"/>
EDIT:
If you want to redirect your Error 404 page to your home page, then paste this code:<meta http-equiv="refresh" content="0;url=/">
Advantages:i. One line code.ii. You can delay the timing of redirection according to your need by replacing the 0 from the code.
And the second one to redirect (used by you,I have excluded the above code) :
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<script type="text/javascript">
window.location.href = "https://zigecek.github.io/error"
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow <a href='https://zigecek.github.io/'>this</a>.
</body>
</html>
Advantages: I do not know.Disadvantages:i. The page will not be redirected if javascript is disabled in the users device, and the other content will be visible.At last, I would like to recommend you that do not make a redirection 'Error 404' page, instead you can make a responsive Error 404 page using Codepen or Google

Related

How disable a stylesheet in </head> when edit with WP Bakery editor

So i have a problem with a code that i added via a WP coder plugin ( a plugin that i can add HTML, CSS JS without coding intern Wordpress)
So the code i add is;
<meta http-equiv="refresh" content="180;url=https://test.link-example.nl/weer/" />
it will redirect in 180s = 3minutes. ( You can guess what happens in a front editor )
The annoying thing is that WPBakery in front-editor mode also redirected within 3 minutes. What i want is when im in the front-editor mode that it not redirect. Only when its in display mode-(just normal web view)
How to fix this?
Perrys.
I tried to make a class and display:none; but that doesn't work.

Why og:url is not taken from meta tags?

On my sharing page: https://tikex-dev.com/kubl/38fn/j1vd/2mi1
in header I specify a different og:url than the url itself, this:
<meta property="og:url" content="https://t44-post-cover.s3.eu-central-1.amazonaws.com/7ou5">
og:url should be point to an AWS S3 gif file.
Though when checking with Facebook debugger, it shows for og:url the 'normal', the sharing page, not the one set by meta tag. Why?
Using Next.js, page is rendered on server side.

Trying to claim website URL for Facebook Instant Articles, but receive fb:pages error

The fb:pages tag on the url doesn't contain this page's id. The url has
fb:pages tag but they don't have this page's id. Please work with your
developers / webmaster to add this tag to your website.
On a Wordpress site, using a child theme. I copied the header.php file from the parent and uploaded it to the child theme, and placed the following code within the tags in the header.php file:
<meta property="fb:pages" content="#############" />
<meta property="og:type" content="website" />
I have troubleshooted this issue in all the recommended ways, including clearing my browser and Wordpress cache, and still continue to get this error. What am I doing wrong?

Can I add rel nofollow to iframe tag?

I have a widget distributed in some sites via an iframe. But I don't want the google bot index the url. Will adding a nofollow to iframe tag resolve the problem?. Does Iframe tag support nofollow, and will Google understand it?
Absolutely, you kind of can add rel="nofollow" to an iframe. You just must be tricky about it. Here's how...
Build a blank html file. Add your iframe to that alone. In the Meta tag include
<meta name="robots" content="noindex,nofollow">
Now, iframe that page onto the one your going to show.
The rel attribute is not allowed for the iframe element.
See allowed attributes for iframe: HTML5, HTML 4.01
According to Google, all you need is
<meta name="robots" content="none" />
“none - Equivalent to noindex, nofollow”
It is not possible but there is a workaround for it. You can use a URL of your domain that redirects to the IFRAME. In your robots.txt, you will prevent the bots to follow the link of your URL.
In your robots.txt add
User-agent:*
Disallow:/h/
Then, create a 301 redirect in your htaccess or something similar if you use something else like nginx. that will redirect a local URL to the URL of the Iframe.
Redirect 301 /h/fancy-url/ http://targetdomain.com/the-uri-of-iframe/
In your iframe use the
<iframe src="https://yourdomain.com/h/fancy-url/?possibleparam=xx">
"rel" is not a recognised attribute for the "iframe" tag according to W3C specs. You could use some javascript and document.write to place the iframe code on the page
you might want to check out is IFrame crawled by Google? but from my understanding the "nofollow" is not allowed on an iframe

Best way to automatically redirect to a website

We have several sites which we need to automatically redirect to another site. At the moment we use index.html with following content to do the redirection (sorry about the tags):
<html>
<head>
<meta http-equiv="refresh" content="0; URL=http://www.example.com" />
</head>
</html>
Is there a better way to do automatic redirection? Maybe programatically with 301? We can not use .htaccess, or something like that. We use asp.net and php on those sites which are being redirected.
Cheers
In PHP
<?php
// 302 redirect
header('Location: newpage.html', TRUE, 302);
?>
using php, you can set Location in header instead
header('Location: http://www.example.com/');
you can also do this client-side in javascript
window.location="http://www.domain.com"

Resources