Skip to main content
4 votes

How can I redirect a PDF to home page?

Place a new .htaccess file in the root of your documents folder within your web server or edit the existing one if you already created one. For each PDF file, place a line in the .htaccess file with ...
Jaron Middleton's user avatar
4 votes

Which redirect code should I use for version divided website?

Material are using a 301, which I'd agree is the right type. The old URL isn't coming back, so temporary redirects would be inappropriate, and you only need 308 in specific use-cases, which I assume ...
RichardB's user avatar
  • 2,938
3 votes
Accepted

Google Search Console reports "Page with redirect" as "errors", are they?

The Page Indexing report doesn't say these are errors, but just lets you know the reason Google aren't indexing links it has found, so that you can review if there is an actual problem. Their ...
RichardB's user avatar
  • 2,938
3 votes

Why does Chrome think that my website is HTTPS?

Chrome connects to HTTPS first Chrome tries to connect to the secured 443 port first. It gets the public certificate and then validates the certificate against a domain authority, (the site that gave ...
Wayne Smith's user avatar
  • 2,701
3 votes
Accepted

When I switch on multilingual in Hugo, the main directory is redirected to the default language

Create alias.html file under layouts. <!DOCTYPE html> <html lang="{{ site.Language.LanguageCode }}"> <head> <title>{{ .Permalink }}</title> <link ...
Dey's user avatar
  • 46
2 votes

Building a webcomic: How to redirect URL to latest slug using htaccess?

A redirect rule needs to know what it is redirecting to when it is applied. This is not known at config time. I don't think rewrites are the way to solve the problem. Clearly you have management of ...
symcbean's user avatar
  • 698
2 votes

How to solve chain of redirects

Resolving the chain or redirects is important, but it will not convince Google to index a 301 page. The example.com/login needs to redirect to the correct destination which is login.example.com. ...
Wayne Smith's user avatar
  • 2,701
2 votes

Is it SEO-acceptable to do an automatic redirect based on Accept-Language header value

I will keep it simple and only talk about the language. The best would be to create one subfolder for english speaking readers, let's say: /en/ and one subfolder for german speaking readers, let's say:...
Nicolas Guérinet's user avatar
2 votes

Redirect double-slash "//" URLs using a rewrite rule in the .htaccess file

In most cases, it is better to create a redirect instead of setting a canonical tag, especially if these are really just technical duplicates. I would also recommend finding out how Google knows about ...
Tim Berlin's user avatar
2 votes

Why is my page a page with redirect and meaning of "referring page" in Google Search Console

Don't worry. That label in Google Search Console shows which page brought the user or bot to the current page. So someone visited your blog from a Chinese clone. It's all good.
Evgeny Yudin's user avatar
2 votes

How do I redirect from domain to subdomain?

Dealing with the redirect in .htaccess can be trickier than it seems at first. First off, make sure you've cleared your browser's cache completely, as sometimes cached data can hide the actual changes ...
Evgeny Yudin's user avatar
1 vote

I have over 400 '3XX redirect in sitemap' errors in Ahrefs and no idea how to solve it

If you go to any image in your admin's media area, you will see that it has both a URL and an "attachment page". The attachment page is something of a deprecated feature, as it's been off ...
RichardB's user avatar
  • 2,938
1 vote

301 redirects for individual pages where the main URL is redirected to a landing page

As I was unable to find anything definitive on the web, this is my solution (basically arrived at by adding the redirects in cPanel redirection and then copying the pattern into htaccess RewriteCond %{...
Chris Pink's user avatar
1 vote
Accepted

How do I redirect from domain to subdomain?

I finally figured it out. The problem was that I couldn't find the file that held the text of the notice: The page you requested could not be found... so I couldn't see where to add the .htaccess file ...
ontologist's user avatar
1 vote
Accepted

Is there any reason to not provide redirect code while still redirecting it?

The biggest reason not to use a 301 redirect code is that your server setup does not support it. Most web hosts do, but occasionally you'll find one that doesn't (as an example off the top of my head, ...
Maximillian Laumeister's user avatar
1 vote

Enom DNS URL redirect doesn't work - HTTPS redirect does not work

You more-or-less hit the problem on the head when you said "I am not running a web server". Redirecting HTTPS requires a webserver along with the bits to handle HTTPS certificate ...
davidgo's user avatar
  • 8,213
1 vote
Accepted

Redirect to HTTPS only works the first time on Nginx

HSTS RFC 6797 states: if the URI contains an explicit port component that is not equal to "80", the port component value MUST be preserved; So HSTS will just change http://example.de:8085 ...
Stephen Ostermiller's user avatar
1 vote

Redirect to Accept-Language with Default

From a SEO perspective you do not need this at all. Search engines will just detect the different languages of your pages based on content or lang-tag and prefer those in the search results. You can ...
Tobias Schwarz's user avatar
1 vote

SSL for domain without hosting

Many domain name providers provide URL redirection or forwarding. For example, in GoDaddy, you can click on your Domain >>> DNS >>> forwarding and configure your domain.sh to forward ...
Luis Alberto Barandiaran's user avatar
1 vote

How may I do a redirect where the page it {redirected to} shows the URL it {redirected from} to the user?

Normally with Apache, you can instruct it to deliver a custom 404 page and show a friendly message to the user. Edit your .htaccess or httpd.conf file and add: ErrorDocument 404 /error404.html ...
Luis Alberto Barandiaran's user avatar
1 vote

Why does Chrome think that my website is HTTPS?

Chrome (like other browsers) now defaults to https. Better Security When Using HTTPS As announced on the Chromium Blog, Chrome's address bar will use https:// by default. This will be available from ...
Rohit Gupta's user avatar
  • 2,564
1 vote

Why would there be 4 identical A and AAAA records?

Having multiple A (for IPV4) and AAAA (for IPV6) facilitates load balancing by using round-robin DNS - This would be the primary use case. It also opens the possibility for apps/OS's to build in ...
davidgo's user avatar
  • 8,213
1 vote

htaccess - redirect all URLs ending in digits

get to this file by typing https://www.example.com/my-folder-name/12345678 So, the part of the file name before the 8 digits and the .php extension won't need to be typed. Unfortunately, this is not ...
MrWhite's user avatar
  • 43k
1 vote

Moving from HTTP to HTTPS in Google Search Console (October 2023)

Surely what you need to do is If you have access to .htaccess, then rewrite the http pages to https. Put in a canonical tag that points to https
Rohit Gupta's user avatar
  • 2,564
1 vote

Building a webcomic: How to redirect URL to latest slug using htaccess?

I found a working solution that doesn't cause redirect errors or pages being stuck or constantly refreshing the page. I have to manually edit the const maxPageNumber = however. <script> // ...
redmoon321's user avatar
1 vote

Nginx not redirecting to specific page

NEVER use a 301 redirect until you've got the configuration working as finalised using 302 redirects. The 301 is cached indefinitely by your browser. You didn't say how you tested this. Using the ...
symcbean's user avatar
  • 698
1 vote

wordpress - all URLs with no trailing slash redirect to include slash

The method that worked fine for me is this : Go to Settings>>Permalinks>>Custom Structures Modify this /%postname%/ to this /%postname%. As you can see I removed the back slash trail at ...
Codemenot's user avatar
1 vote

What is the most SEO friendly way to redirect the main domain to different subdirectories?

The domain www.hp.com automatically redirects to your region-specific subfolder based on your IP address. It could also be done using accept-language in htaccess. So, for instance, if you are located ...
Nicolas Guérinet's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible