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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
...
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:...
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 ...
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.
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 ...
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 ...
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 %{...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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
...
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 ...
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 ...
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 ...
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
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>
// ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
redirects × 1679seo × 498
htaccess × 400
301-redirect × 349
domains × 164
https × 130
wordpress × 129
apache × 129
url × 120
mod-rewrite × 103
dns × 102
subdomain × 91
google × 82
google-search-console × 81
url-rewriting × 69
302-redirect × 50
404 × 47
web-hosting × 46
php × 40
canonical-url × 38
apache2 × 38
http × 38
google-analytics × 35
google-search × 34
iis × 34